Progression with OpenGL 2.0

Dereferenced lookups are lookups based on values calculated in the ALU part of the pixel shader, rather than directly from the interpolators.
 
Dio said:
Remember that these intermediate values can be used as the texture coordinate for a dereferenced texture lookup...
For that, 16 bit may not be enough, but if it's all in control of the programmer, that's just fine imo. The compiler could support the programmer and prevent errors by returning a warning/error when you use a half with a sampler without explicit cast to float.
 
Can someone confirm it's the same language for fragment and vertex shaders?
Thought I read that before, my acroread somehow went fubar so I can't check it :(
thx
 
I don't know if this answers the question, but as far as I understood - almost.

OVERVIEW OF OPENGL SHADING
The OpenGL Shading Language is actually two closely related languages. These languages are used to create shaders for the programmable processors contained in the OpenGL processing pipeline. The
precise definition of these programmable units is left to separate specifications. In this document, we define them only well enough to provide a context for defining these languages.

Unless otherwise noted in this paper, a language feature applies to all languages, and common usage will refer to these languages as a single language. The specific languages will be referred to by the name of
the processor they target: vertex or fragment.
 
Yes, the vertex and fragment language are pretty much the same. Small differences exist due to the different tasks they are trying to solve. For instance you can't access vertex attributes in the fragment pipeline for obvious reasons, and since there's no such thing as a fragment attribute in the same sense there's nothing in the fragment pipeline you can map onto the same syntax, so a declaration of a vertex attribute in a fragment shader is an error.

Another important thing to note is that in GL2 the fragment and vertex shader is compiled and linked together in the same program object. This means that the fragment and vertex shader can share constants.
 
Back
Top