[PATCH 1/4] wined3d: Handle fog_start == fog_end with table fog

Henri Verbeet hverbeet at gmail.com
Sat Jun 15 03:40:34 CDT 2013


On 14 June 2013 22:34, Stefan Dösinger <stefan at codeweavers.com> wrote:
> +                    {
> +                        float increase = eps;
> +                        volatile float fogend2 = fogend;
> +                        do
> +                        {
> +                            fogend2 += increase;
> +                            increase *= 2.0f;
> +                        }
> +                        while (fogstart == fogend2);
> +                        fogend = fogend2;
> +                    }
Why is this needed? When end == start I'd expect (end - c) / (end -
start) to evaluate to +/-INF, and then get clamped to [0, 1], which is
pretty much what you'd want. In my (very limited) testing, that's also
what actually happens with at least the GLSL backend.



More information about the wine-devel mailing list