at_midBlock
in vec4 at_midBlock;
Valid Programs: gbuffers_terrain.vsh
, gbuffers_water.vsh
, shadow.vsh
The xyz
components store the world/player space offset from the vertex’s position to the center of the block in 1/64th block units. For example, the center position would be calculated like this:
vec3 centerPosition = position + at_midBlock.xyz / 64.0;
In Iris 1.7 and newer, the w
component stores the light level of the current block (without the influence of nearby light sources, range 0
to 15
). This can be used to tell if a block is emissive. It’s recommended to use this together with BLOCK_EMISSION_ATTRIBUTE
.