Matrix Uniforms
These uniforms store matrices used for converting between coordinate spaces. More info on the coordinate spaces used in Iris can be found in the Coordinate Spaces page.
gbufferModelView
Transforms coordinates from player space to view/eye space.
gbufferModelViewInverse
Equal to inverse(gbufferModelView)
, but calculated on the CPU to avoid running the expensive inverse()
function on the GPU.
gbufferProjection
Equal to the projectionMatrix
used by all gbuffers programs except for gbuffers_hand
and gbuffers_hand_water
, where the projectionMatrix
multiplies the Z axis by MC_HAND_DEPTH
to move the hand closer to the camera than the rest of the world.
gbufferProjectionInverse
Equal to inverse(gbufferProjection)
, but calculated on the CPU to avoid running the expensive inverse()
function on the GPU.
shadowModelView
Equal to the modelViewMatrix
when the shadow map was generated in the shadow program.
shadowModelViewInverse
Equal to inverse(shadowModelView)
, but calculated on the CPU to avoid running the expensive inverse()
function on the GPU.
shadowProjection
Equal to the projectionMatrix
when the shadow map was generated in the shadow program.
shadowProjectionInverse
Equal to inverse(shadowProjection)
, but calculated on the CPU to avoid running the expensive inverse()
function on the GPU.
gbufferPreviousModelView
The value of gbufferModelView
in the previous frame.
gbufferPreviousProjection
The value of gbufferProjection
in the previous frame.
modelViewMatrix
Transforms coordinates from model/local space to view/eye space.
Equal to mat4(1.0)
in begin
, prepare
, deferred
, composite
and final
programs.
Equivalent to gl_ModelViewMatrix
in the compatibility profile and older GLSL versions.
modelViewMatrixInverse
Equal to inverse(modelViewMatrix)
, but calculated on the CPU to avoid running the expensive inverse()
function on the GPU.
projectionMatrix
Transforms coordinates from view/eye space to clip space.
Equivalent to gl_ProjectionMatrix
in the compatibility profile and older GLSL versions.
projectionMatrixInverse
Equal to inverse(projectionMatrix)
, but calculated on the CPU to avoid running the expensive inverse()
function on the GPU.
normalMatrix
Matrix to transform a model space normal vector to view space.
Equivalent to mat3(transpose(modelViewMatrixInverse))
, or gl_NormalMatrix
in the compatibility profile and older GLSL versions.
textureMatrix
Transforms texture coordinates. Mainly used in gbuffers_armor_glint
to scroll the texture over time, but may be applied to other geometry as well (especially by mods). It is therefore strongly recommended to use this matrix in all gbuffers-style programs utilizing vaUV0
.
Equivalent to gl_TextureMatrix[0]
in the compatibility profile and older GLSL versions.