Overview
The shaders.properties
is a text file placed in the shaders
folder that allows for configuring many options of a shaderpack. This file has two main purposes:
- Configuring and displaying user accessible shader options
- Configuring internal shader settings
Any of the directives can be included on its own line in shaders.properties
. The directives can appear in any order. Below is an example shaders.properties
file:
User Accessible Shader Options
shaders.properties
can be used to configure user accessible options, which appear in the “Shader Pack Settings” screen in Iris. More info can be found in the shader settings page.
The following directives are available to control user accessible options in shaders.properties:
Directive | Description |
---|---|
screen | Controls which shader options are displayed in the “Shader Pack Settings” screen and how they are displayed |
sliders | Controls which shader options should be displayed as sliders |
profile | Defines profiles, i.e. pre-configured sets of user options selectable in the “Shader Pack Settings” screen |
.lang files
.lang files can be used to add language specific overrides to option names and further customize how options appear in the “Shader Pack Settings” screen. The following directives are available in .lang files:
Directive | Description |
---|---|
option | Changes the visible name of an option |
value | Changes the visible name of an option value |
prefix | Adds a prefix to all values of an option |
suffix | Adds a suffix to all values of an option |
comment | Adds/changes the tooltip for an option |
Internal Shader Settings
These directives control aspects of the shader pipeline. For example, they might enable/disable specific programs, change the order particles are rendered, override user clouds settings, etc.
Preprocessor directives can be used with internal shader settings, using macros based on shader options defined automatically. However, you cannot use #define
or #include
in shaders.properties
.
Below is an index of shaders.properties directives available in Iris. Directives marked as Iris Exclusive are only available in Iris, and any unmarked uniforms is available in either Optifine or Iris.
Feature Flags
Feature flags are an Iris system to query the activation state of certain features. Some features require setting a feature flag to use. Feature flags can also be set as required, meaning the pack will only load if the system / Iris version supports the feature.
Directive | Description | Tag |
---|---|---|
iris.features.required | Sets the feature flags required to load the shader, enables those feature | Iris Exclusive |
iris.features.optional | Sets the feature flags optional to load the shader, enables feature if supported | Iris Exclusive |
Programs / Ordering
Directive | Description | Tag |
---|---|---|
particles.ordering | Controls the order in the pipeline particles will be rendered | Iris Exclusive |
particles.before.deferred | Legacy option for particle ordering, replaced by particles.ordering | |
separateEntityDraws | Controls whether translucent entities/block entities are drawn before or after the deferred pass | Iris Exclusive |
program.enabled | Allows programs to be disabled based on shader options | |
shadow.enabled | Enables or disables the shadow pass | Iris Exclusive |
shadowTerrain | Sets whether terrain is rendered in the shadow pass | |
shadowTranslucent | Sets whether translucent terrain is rendered in the shadow pass | |
shadowEntities | Sets whether entities are rendered in the shadow pass | |
shadowPlayer | Sets whether the player is rendered in the shadow pass | Iris Exclusive |
shadowBlockEntities | Sets whether block entities are rendered in the shadow pass | |
shadowLightBlockEntities | Sets whether block entities that emit light are rendered in the shadow pass | Iris Exclusive |
skipAllRendering | Enables or disables most gbuffers passes | Iris Exclusive |
voxelizeLightBlocks | Renders light blocks as an invisible quad in the shadow pass so that they can be voxelized | Iris Exclusive |
indirect.pass | Allows you to dispatch a compute shader with the work group amount specified from a SSBO | Iris Exclusive |
allowConcurrentCompute | Enables concurrent compute passes | Iris Exclusive |
Features / Options
Directive | Description | Tag |
---|---|---|
clouds | Enables or disables vanilla cloud rendering | |
moon | Enables or disables rendering of the moon texture in gbuffers_skytextured | |
sun | Enables or disables rendering of the sun texture in gbuffers_skytextured | |
sky | Enables or disables rendering of vanilla sky in gbuffers_skybasic | Iris Exclusive |
stars | Enables or disables rendering of stars in the sky in gbuffers_skybasic | Iris Exclusive |
underwaterOverlay | Enables or disables the water texture overlay when the player is underwater | |
vignette | Enables or disables rendering of the vignette overlay | |
oldHandLight | Sets heldBlockLightValue to use whichever hand’s value is higher (for legacy support) | |
oldLighting | Enables the “old lighting”, which applies a lighting multiplier in the color attribute based on the block’s orientation | |
separateAo | Controls whether vanilla AO is stored in the RGB or A components of the color vertex attribute | |
supportsColorCorrection | Allows the shader to perform its own conversion to a different color space | Iris Exclusive |
weather | Enables or disables weather (rain & snow) geometry and rain splash particles. | Iris Exclusive |
Rendering
Directive | Description | Tag |
---|---|---|
alphaTest | Sets the alpha test function for cutout programs | |
blend | Sets the alpha blending parameters for a specific program, optionally per-buffer | |
scale | Defines a new viewport for a composite style program | |
flip | Enable or disable buffer flipping for a composite style program | |
size.buffer | Sets the resolution of a colortex buffer | |
backFace | Enables or disables back-face culling for each type of rendering | |
frustum.culling | Enables or disables frustum culling | |
occlusion.culling | Enables or disables occlusion culling | Iris Exclusive |
shadow.culling | Controls culling in the shadow pass | |
rain.depth | Sets whether rain and snow write to the depth buffer | |
beacon.beam.depth | Sets whether beacon beams write to the depth buffer |
Custom Uniforms
Custom uniforms can be used to create one-off values on the CPU, rather than having to compute them on the GPU. They are then uploaded to the GPU as uniforms, and are accessible from any shader program.
Directive | Description |
---|---|
uniform | Defines a custom uniform which is evaluated on the CPU and uploaded on program change |
variable | Defines a variable to be used in a custom uniform |
Textures / Buffers
These directives allow for setting up custom textures, images, and SSBOs. They are further described in the “Buffers” section (and linked here).
Directive | Description | Tag |
---|---|---|
texture | Creates a Custom texture, which binds an image/texture to an existing sampler | |
texture.noise | Loads an image from shader files into noisetex | |
customTexture | Creates an Enhanced Custom Texture, which binds an image/texture to a new sampler | Iris Exclusive |
image | Creates a custom image with a sampler | Iris Exclusive |
bufferObject | Creates a Shader Storage Buffer Object (SSBO) | Iris Exclusive |