Skip to content

gl_MultiTexCoord1

gl_MultiTexCoord1

Valid Programs: gbuffers_*.vsh, shadow.vsh


gl_MultiTexCoord1 stores the block light level in the x component, and the sky light level in the y component. However, the exact range of the values is indeterminate (though it is currently 0-240). Therefore, it is recommended to use gl_TextureMatrix[1].

vec2 lmcoord = (gl_TextureMatrix[1] * gl_MultiTexCoord1).xy;

in ivec2 vaUV2;

It is recommended to use the following matrix:

const mat4 TEXTURE_MATRIX_2 = mat4(vec4(0.00390625, 0.0, 0.0, 0.0), vec4(0.0, 0.00390625, 0.0, 0.0), vec4(0.0, 0.0, 0.00390625, 0.0), vec4(0.03125, 0.03125, 0.03125, 1.0));
vec2 lmcoord = (TEXTURE_MATRIX_2 * vec4(vaUV2, 0.0, 1.0)).xy;