-
Notifications
You must be signed in to change notification settings - Fork 5
Documentation: shader_interface.glsl
Essentuan edited this page May 28, 2026
·
2 revisions
This is the main file Photonics uses interface with your shader for its own render passes. All the following methods need to be defined for Photonics lighting to work properly.
vec3 load_world_position();Used by Photonics to obtain the world positon of the current fragment.
void load_fragment_variables(
out vec3 albedo, // The albedo of the current fragment
out vec3 world_pos, // The world pos of the current fragment,
out vec3 geometry_normal, // The geometry normal of the current fragment in world space
out vec3 texture_normal // The texture normal of the current fragment in world space
);Used by Photonics to obtain data of the current fragment.
For more information see How to adapt your Shaderpack.
vec3 sun_direction;The current direction to the sun or moon (depending on which one is the active light source)
vec3 sun_direction;The color used by indirect for the sun/sky, should be your sky color.
vec2 get_taa_jitter();The TAA jitter for the current fragment, in NDC space. Should only be used if you apply TAA in load_world_position/load_fragment_variables.
bool is_in_world();Returns true if the current fragment is in the world for.
- Home
- Documentation
- How to adapt your Shaderpack