Camera and Player Model Uniforms
These uniforms store information about the camera and player model, including camera/player position, first person camera settings, and lighting values at the camera, and more.
cameraPosition
This uniform stores the position of the camera in world space.
This is similar to the in game coordinates, except for precision reasons the value is wrapped after a large number of blocks. In modern Iris, the value will reset every 30000
blocks when walking, or if the player has teleported more than 1000
blocks. Optifine resets every 1000024
blocks.
For more information on spaces, visit this how to article on the different spaces.
eyeAltitude
This uniform stores the float value of the altitude of the player, stored in blocks. This is equivalent to cameraPosition.y
. This value matches the one displayed on the f3
screen. For more information visit the Minecraft Wiki article on altitude.
cameraPositionFract Iris Exclusive
This uniform stores the fractional component (0
to 1
) of the position of the player camera. This value is intended to be used with cameraPositionInt
to determine the exact player camera position without precision errors.
cameraPositionInt Iris Exclusive
This uniform stores the integer component (truncated value) of the position of the player camera. Unlike cameraPosition
, this value is not shifted.
previousCameraPosition
This value is the cameraPosition
uniform value from the previous frame.
previousCameraPositionFract Iris Exclusive
This value is the cameraPositionFract
uniform value from the previous frame.
previousCameraPositionInt Iris Exclusive
This value is the cameraPositionInt
uniform value from the previous frame.
eyePosition Iris Exclusive
This value stores the world space position of the player’s head model. When in first person view, this is equivalent to cameraPosition
. However in third person mode the two will differ as the camera and player’s head are now in different locations.
relativeEyePosition Iris Exclusive
This value stores the world space offset from the player model’s head position to the camera’s position(ie cameraPosition
-
eyePosition
).
playerBodyVector Iris Exclusive
This value is intended to store the world aligned direction the player model’s body is facing, although this behavior is currently broken and reads the same value as playerLookVector
.
playerLookVector Iris Exclusive
This value stores the world aligned direction the player model’s head is facing. This facing direction is not affected by animations such as swimming, making this value equivalent to the direction the camera is facing in first person and rear third person views, and the reverse of the camera direction in front third person view.
upPosition
This uniform stores the vector pointing upwards (in the world) in view space. This value can also be pulled from gbufferModelView[1].xyz
. The length of this adds up to 100 (normalizedValue * 100
).
eyeBrightness
The lightmap value at the player’s location. The x
component stores the block light and the y
component stores the sky light. The value is stored in the range [0-240].
eyeBrightnessSmooth
This uniform stores the value of eyeBrightness
, smoothed over time. The speed of the smoothing can be controlled with eyeBrightnessHalflife
.
centerDepthSmooth
This uniform stores the value in the depth buffer depthtex0
at the center of the screen, smoothed over time. The speed of the smoothing can be controlled with centerDepthHalflife
.
firstPersonCamera
This value is true
when the player is in the first person camera view and false
in any third person camera view.