PDA

View Full Version : EXT_vertex_shader and fog coordinates



fenris
03-16-2002, 09:55 AM
How exactly does this extension expect it's fog coordinates? NV_vertex_program wants the eye-space distance of the vertex in the X component of the output fog coordinate register. I tried the same on a Radeon 8500 using the 6043 leaked drivers (as well as the official drivers from ATI) without success. The extension specs do not mention how the fog coordinate is handled or how to write the fog coordinate register (is it just the X component, or is the fog coordinate a scalar, not a vector like I am assuming).

Anyone have any ideas? Humus? http://www.opengl.org/discussion_boards/ubb/smile.gif

zeckensack
03-16-2002, 10:37 AM
I know nothing about fragment shaders. Accordingly, I don't know how much of the standard GL fog still works when you use them. If it still does, then I don't know whether you get the real fog coord into the shader, or the resulting fog weight. Sheesh, I gotta read up on that RSN.


The fog coordinate is a scalar. EXT_fog_coord lets you specify it on a per-vertex basis, if you want to do that. Fog coords are kinda like depth values, they also get transformed by the selected fog equation. The result is a fog weight, kinda like a blending factor.