[PATCH 2/8] wined3d: Avoid potential division by 0 when computing fog scale.

Henri Verbeet hverbeet at gmail.com
Wed Jun 17 04:36:28 CDT 2015


On 16 June 2015 at 22:45, Matteo Bruni <mbruni at codeweavers.com> wrote:
>      get_fog_start_end(context, state, &start, &end);
> -    scale = 1.0f / (end - start);
> +    scale = end == start ? INFINITY : 1.0f / (end - start);
Do we really need this? It almost feels nicer to just pass "end -
start" to the shader and handle the division there, or perhaps even
just pass "start".



More information about the wine-devel mailing list