vaPosition
in vec3 vaPosition;
Valid Programs: all gbuffers/shadow
The vertex position attribute. For terrain this is relative to the chunk and you must add chunkOffset
as shown below:
vec3 model_pos = vaPosition + chunkOffset;
For all other geometry, vaPosition
directly stores the model space position. In either case, the model space position is equivalent to gl_Vertex.xyz
from the compatibility profile.
The model space position can be converted to view space using modelViewMatrix
(or gl_ModelViewMatrix
in the compatibility profile).