Skip to content

Documentation: Provided Files

Essentuan edited this page Mar 28, 2026 · 1 revision

Provided Files

Photonics comes with 2 main files that open up its API: /photonics/photonics.glsl and /photonics/ph_samplers.glsl. These files both have #if guards to prevent them from being included multiple times.

Due to the way Iris handles includes you must create an empty stub with the same name, otherwise Iris will complain about them being missing (even if you put the include behind an #if guard!).

Other files

While /photonics/photonics.glsl and /photonics/ph_samplers.glsl are the 2 main for its API. Photonics lets you replace every shader it uses (besides photonics/photonics.glsl and photonics/ph_samplers.glsl for the reason above). Most files Photonics uses are not stable, with 2 main exceptions:

Modifiers (since v0.3.1)

Modifiers are a concept analogous to the idea of Mixins, they allow you to add your own code to certain parts of Photonics.

These will never change without at least minor version increment.

Handheld & GI samplers (since v0.3.1)

Due to the usefulness of being able to replace Photonics built in handheld & GI, they are guaranteed to be stable between incremental updates, them being:

  • /photonics/common/handheld_lighting.glsl
  • /photonics/common/indirect_lighting.glsl

Clone this wiki locally