PDA

View Full Version : fogCoordEXT



Ozzy
06-03-2002, 09:07 AM
Ok, i would like to use this EXT to make nice vol effects ;)=
But it seems that z values that u're supposed to use as fogCoord per vertex have to be stored in an *already* transformed state. :(
In fact, is there any way to perform the same transformations onto fogCoords as they're done onto vertex?

did i miss anything?

as an example:
when using GL_FOG_COORDINATE_EXT to simulate
GL_FRAGMENT_DEPTH_EXT it should be obvious that fogCoord per vertex is the z value itself? eh?? ;))

But.. maybe the earth is finally flat. ;)

Ozzy
06-03-2002, 09:11 AM
sorry..
in GL terms, glFogCoordEXT doesn't seem to care *much* about the GL_MODELVIEW & GL_PROJECTION matrices. ;(
anyone?



[This message has been edited by Ozzy (edited 06-03-2002).]

Bob
06-04-2002, 01:31 AM
The fog weight you pass is the weight that is otherwise taken from the Z-part of a vertex in world space (i.e. after the modelview, but before the projection matrix). The fog weight is transformed by the fog equations (linear, exp or exp2) before you get the actual fog value for that vertex.

Transforming the fog weight by the modelview/projection matrix doesn't make sence at all, since the fog weight is a one dimensional constant, while the matrices are four dimensional.