View Full Version : fp environment/local parameters

06-19-2003, 06:26 PM
Can someone explain to me what the difference between environment and local parameters is?

Question 2:
In a vp, there are vertex attributes besides the basic ones (like primary color, sec color, fog color, ).
What happens to these in the fp stage? They are no longer accessible?

06-19-2003, 07:49 PM
Environment parameters apply to all programs with the same target (e.g. GL_VERTEX_PROGRAM_ARB or GL_FRAGMENT_PROGRAM_ARB). Local parameters only apply to the currently bound program.

What happens between the vp and fp stages is that any parameters you write out in a vertex program get interpolated across the triangles and can be accessed from the fragment program, now on a per-pixel basis. You are limited in which vertex attributes can be written out of the vp and read into the fp. See specs for further details http://www.opengl.org/discussion_boards/ubb/smile.gif

-- Zeno