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

Stefan Dösinger stefan at codeweavers.com
Sat Jun 15 16:10:29 CDT 2013


-----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.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRvNhFAAoJEN0/YqbEcdMwjfEP/1nPD4/1hIZAG/YDroQpYTqQ
KuoSdCxs6eq2RL8sm02e5GhuODUL9In1rsoNB26vPEMYK+Gvl/QfxufqTM92HAdU
AD3E/1rS1ALAKJ276Betu6Fkkp6ZFUcKQrRgN4HEXyi0zn3Xf+5PsO3XYvgwPjln
Rl9EbSuy2j2eQvH/ybbokwzZ5btb62CvhhwFEttwkZtXj44hibF72ofGCsUh/NIl
5QZSKPE2f9r/wW5KnqfYRgP7a+UrHk1wpmoAmBIZ5H3Xua2n55k7ofVeitYcRCYp
9+qh3k/Vzk7sqggos2s2cSt7gnzfgdz9o4oBetGufwMwAJ/Md8HeR7fRLojb4oru
vxcfIL3Q2G7BO4yeQ2Kk1dIxR3rkCKiLh9OoN3ACDjfMvQZKvYzOnhUOVbxLzBqW
Jp+AzHX2ZqqsHChjuPFF2zroBXkEz9zXyKkpz/Nbo88vqgVMg9VFSLepou6X9fUn
Xw3goO/fOCe+kZ3bEKb+jhbqAvlU7qaHAm8Qs8xxMoeHTtVfWwSlN9fTm4z9wrHE
dZWQ5fCGpsmuwxY6hm0MhDbyfMpV5xPdHvxFA5glX5wC4rJqdrfQMVLvImEhbl4T
Qgq5ZiYojmit3jpr1MAr1h4nOyRhmdUPjCL6BEnFVp1TfSylxVA/yZtQatW65QA5
6FApdSgz+lTEilXT0cD8
=6pcA
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list