-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2013-06-15 10:40, schrieb Henri Verbeet:
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.
I re-tested this on Nvidia and r600g. GLSL works as expected on both drivers, but ARB and the fixed function GL pipeline have different behavior. On Nvidia, everything is fogged (like d3d vertex fog). r600g seems to increase one of the parameters like my patch does, with two differences: It adds a higher number, so there's a visible fog gradient, and it increases fogstart (or decreases fogend), so it produces the opposite of what we want.
I can test other drivers, but I think it is safe to conclude that fogstart==fogend is not well defined in GL and we want to avoid it.