Skip to content

Documentation: Voxel Color Modifier

Essentuan edited this page Mar 28, 2026 · 1 revision

Voxel Color Modifier (since v0.3.1)

/photonics/modifiers/voxel_color_modifier.glsl

Intercepts the color of a voxel during tracing. Disabled using PH_VOXEL_COLOR_MODIFIER_DISABLED.

Usage:

// result_block_id can be used to ge the block id
void voxel_color_modifier(
    inout vec4 color, // component range is 0..1 
    vec3 rt_pos, 
    ivec3 rt_block_pos
);

Clone this wiki locally