oFog.x in all three cases will have the same result. Generaly the first code snippet would be better since it’s one less instruction. But there are some cases I’m sure where you would need to store ePos.z + 1000 in a temp register to use later on in a program. Just depends on what you’re doing I guess.
Thanks for the answer.
That’s also what I think but I get different results.
Anyway I just realized I was testing the program on a Radeon8500, and even if I’m running the latest drivers I think I’ll try to catch a GeForce and test it too.
I haven’t checked the error but I guess it’s ok since the program is accepted : all outputs are computed correctly (vertex, texcoords, color) except fog obviously.
drivers 3.0 are the ones that were released for DX9 ? If so, they are the ones I’m using (at least on Radeon8500, I’m not the one who installed drivers on Radeon9700) and I’m definately having problems.