Skip to content

vaNormal

in vec3 vaNormal;

Valid Programs: gbuffers_*.vsh, shadow.vsh


The vertex normal vector attribute, equivalent to gl_Normal from the compatibility profile.

The normal vector from vaNormal is approximate, and in model space (which varies for different geometry). It can be converted to view space using normalMatrix (or gl_NormalMatrix in the compatibility profile).

vec3 normal = normalMatrix * normalize(vaNormal);
vec3 normal = gl_NormalMatrix * normalize(gl_Normal);