Skip to content

Documentation: Properties

Essentuan edited this page Mar 28, 2026 · 5 revisions

Properties

Photonics uses shaders.properties to change its internal configuration. Most of these support the use of preprocessor directives, it will be noted when a property does not allow the use of the preprocessor.

photonics.enabled (since v0.3.0)

Accepts true or false (defaults to true)

Enable/disable the use of Photonics. Only works for shaders, NOT PATCHES.

photonics.supported (since v0.3.0)

Accepts true or false. Does not support the use of the preprocessor.

Indicates to Photonics a PATCH supports photonics. Does nothing if used outside a patch.

photonics.renderScale (since v0.3.0)

Accepts a float (defaults to 1)

Sets the resolution photonics renders at, as a factor of the screen resolution (E.g 0.5 renders at half resolution).

photonics.alphaMode (since v0.3.0)

Accepts none, block, voxel (defaults to none), supports any case (E.g. NONE and none are both supported)

Changes the way Photonics handles transparent voxels during tracing.

  • none: Treats transparent voxels as opaque. (no performance impact)
  • block: Applies tint based on the first transparent voxel, then skips tracing to the next block. (small performance impact)
  • voxel: Applies tint based on every encountered transparent voxel. (large performance impact)

photonics.maxLights (since v0.3.0)

Accepts a non-zero positive integer (defaults to 1000)

Sets the maximum number of lights that can be loaded by Photonics.

photonics.enchantmentGlintStrength (since v0.3.1)

Accepts a float (defaults to 1)

Controls the strength of enchanted items in handheld.

photonics.useSeparateHandheldRays (since v0.3.1)

Accepts true, or false (defaults to true)

Controls whether Photonics uses separate rays for each hand in handheld. When enabled each hand will cast their own shadow, otherwise only 1 shadow will be cast.

photonics.voxelizeLava (since v0.3.0)

Accepts true or false (defaults to false)

Controls whether lava is represented in Photonics voxel structure. Even when true, lava will still appear invisible, but will return the correct block id when using get_block_id.

photonics.enableGi (since v0.3.0)

Accepts true or false (defaults to true)

Controls whether Photonics does gi tracing.

photonics.enableBlockLight (since v0.3.0)

Accepts true or false (defaults to true)

Controls whether Photonics does block light tracing.

photonics.enableHandheldLight (since v0.3.0)

Accepts true or false (defaults to true)

Controls whether Photonics does handheld tracing.

photonics.enableLightBinning (since v0.3.1)

Accepts true or false (defaults to true when photonics.lightingMode is BASIC, otherwise false)

Controls whether Photonics does light binning.

photonics.lightingMode (since v0.3.1)

Accepts off, basic, restir (defaults to basic), supports any case (E.g. OFF and off are both supported)

Controls how Photonics does block light tracing.

Using off will disable all traced lighting effects, including GI & Handheld. Does not disable voxelization or 3D Blocks. Unlike photonics.enable<Effect> = false, off will skip any extra rendering steps Photonics does for lighting.

photonics.maxSamples (since v0.3.0)

Accepts a non-zero positive integer (defaults to 20)

Sets the maximum number of lights that can be sampled per fragment with basic lighting. This setting is analogous to 'Max Light Samples' in rethinking voxels.

This setting has a large impact on Photonics build time.

photonics.restirInitialSamples (since v0.3.1)

Accepts a non-zero positive integer (defaults to 32)

The number of lights ReSTIR will initially consider.

photonics.restirSpatialReuseSamples (since v0.3.1)

Accepts a non-zero positive integer (defaults to 5)

The number of samples ReSTIR uses for spatial reuse.

photonics.restirSpatialReuseRadius (since v0.3.1)

Accepts a float (defaults to 10)

The radius of spatial reuse.

photonics.restirAccumulationFrames (since v0.3.1)

Accepts a non-zero positive integer (defaults to 15)

The number of frames ReSTIR uses for accumulation.

photonics.restirDenoiserPasses (since v0.3.1)

Accepts a positive integer (defaults to 5)

The number of denoiser passes for ReSTIR. A value of 0 disables denoising. Values past 5 can have visual artifacts.

photonics.restirSoftShadows (since v0.3.1)

Accepts true or false (defaults to true)

Whether ReSTIR should use soft shadows.

photonics.restirCombinedGi (since v0.3.2)

Accepts true or false (defaults to false)

Whether ReSTIR should pass Gi through its denoiser. Results in much more precise Gi at the cost of noise.

When enabled Gi will be baked in sample_photonics_direct

Clone this wiki locally