Skip to content

gl_Color

gl_Color

Valid Programs: gbuffers_*.vsh, shadow.vsh


The vertex color attribute.

The color attribute is often used to apply tints to colored blocks such as leaves, grass, water, etc. It also contains the vanilla ambient occlusion and, if enabled, the old lighting.

Enabling separateAo will move the ambient occlusion from the rgb components of gl_Color to the a component, which can be applied later like this:

vec3 color = gl_Color.rgb * gl_Color.a;

in vec4 vaColor;

vaColor is the equivalent of gl_Color for the core profile.