[Mesa-dev] [PATCH 07/11] program: fix comment about the fog formula

Ian Romanick idr at freedesktop.org
Tue Dec 15 17:29:17 PST 2015


Yes... that matches the GL_ARB_fragment_program spec.  This patch is

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

Assuming there are no objections, I'll push this in 24 hours.

On 12/15/2015 03:05 PM, Miklós Máté wrote:
> ---
>  src/mesa/program/prog_statevars.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/program/prog_statevars.c b/src/mesa/program/prog_statevars.c
> index bdb335e..12490d0 100644
> --- a/src/mesa/program/prog_statevars.c
> +++ b/src/mesa/program/prog_statevars.c
> @@ -474,7 +474,7 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[],
>            * single MAD.
>            * linear: fogcoord * -1/(end-start) + end/(end-start)
>            * exp: 2^-(density/ln(2) * fogcoord)
> -          * exp2: 2^-((density/(ln(2)^2) * fogcoord)^2)
> +          * exp2: 2^-((density/(sqrt(ln(2))) * fogcoord)^2)
>            */
>           value[0] = (ctx->Fog.End == ctx->Fog.Start)
>              ? 1.0f : (GLfloat)(-1.0F / (ctx->Fog.End - ctx->Fog.Start));
> 



More information about the mesa-dev mailing list