Skip to content

vaNormal

in vec3 vaNormal;

Valid Programs: all gbuffers/shadow


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

The normal vector from vaNormal is 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 * vaNormal;
vec3 normal = gl_NormalMatrix * gl_Normal;