at_midBlock
in vec4 at_midBlock;
Valid Programs: terrain (gbuffers_terrain, gbuffers_water, shadow)
The first three 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:
In Iris 1.7 and newer, at_midBlock.w
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
.
This attribute (both the mid block offset and the emission value) are only available for terrain.