-
Notifications
You must be signed in to change notification settings - Fork 5
Documentation: Uniforms
Some uniforms are defined in /photonics/photonics.glsl, and will be noted as such.
uniform int phFirstBuildTime;The frame Photonics finished its first build. This does not mean blocks have finished voxelizing yet.
This value uses the same counter as frameCounter.
uniform int phLastBuildTime;The frame Photonics finished its most recent build.
This value uses the same counter as frameCounter.
uniform vec3 world_offset;This uniform is defined by /photonics/photonics.glsl.
The origin of Photonics tracing structure, in blocks. Useful to convert world space to and from RT space:
vec3 world_pos;
vec3 rt_pos = world_pos - world_offset;uniform vec3 world_camera_position;This uniform is defined by /photonics/photonics.glsl.
The camera position in world space. Unlike cameraPosition, this value does not wrap around.
uniform vec3 rt_camera_position;This uniform is defined by /photonics/photonics.glsl.
The camera position in the RT coordinate space (E.g. rt_camera_position = world_camera_position - world_offset).
This computation is done on the CPU with double precision.
Can be useful to convert player pos to rt space without precision errors.
vec3 player_pos;
vec3 rt_pos = player_pos + rt_camera_position;uniform int ph_light_count;This uniform is defined by /photonics/photonics.glsl.
The number of lights loaded in the light list.
uniform bool left_handed;This uniform is defined by /photonics/photonics.glsl.
true when the players main hand is set to their left hand.
uniform bool main_hand_has_light;This uniform is defined by /photonics/photonics.glsl.
true when the players main hand is holding a light.
uniform bool off_hand_has_light;This uniform is defined by /photonics/photonics.glsl.
true when the players offhand is holding a light.
- Home
- Documentation
- How to adapt your Shaderpack