/***********************************************/
/*           Copyright (c) 2025 Belmu          */
/*             All Rights Reserved             */
/***********************************************/

/*
    [Notes]:
        See "shaders\include\fragment\heitz\heitz.glsl" for references and notes.
*/

float P1(float h) {
    return INV_SQRT_TAU * exp(-0.5 * h * h);
}

float C1(float h) {
    return erf(INV_SQRT_2 * h) * 0.5 + 0.5;
}

float invC1(float U) {
    return SQRT_2 * erfInv(2.0 * U - 1.0);
}
