Skip to content

Feature Flags

Location: shaders.properties

Feature flags are an Iris system to query the activation state of certain features. To activate them there are two directives that can be placed in shaders.properties: iris.features.required and iris.features.optional. iris.features.required will throw an error if your device or version of Iris does not support the feature. iris.features.optional will create a define that can be used to test the availability of such a feature. Additionally the IS_IRIS define can be used to test if your shader is in Iris or optifine, and always exists.


To use the flags add the following to your shaders.properties:

iris.features.required=SEPARATE_HARDWARE_SAMPLERS COMPUTE_SHADERS
iris.features.optional=BLOCK_EMISSION_ATTRIBUTE ENTITY_TRANSLUCENT SSBO

The following are currently valid options:

SEPARATE_HARDWARE_SAMPLERS (required for Separate Hardware Shadow Samplers)

HIGHER_SHADOWCOLOR (required for Extended Shadowcolor)

PER_BUFFER_BLENDING

COMPUTE_SHADERS

TESSELATION_SHADERS

ENTITY_TRANSLUCENT (recommended, but not required for Entity Translucent)

SSBO (required for Shader Storage Buffer Objects)

CUSTOM_IMAGES (required for Custom Images)

REVERSED_CULLING (recommended, but not required for Reverse Shadow Culling)

BLOCK_EMISSION_ATTRIBUTE (recommended, but not required for [Block Emission: at_midBlock.w] as of [iris-1.7.0-snapshotmc1.20.4-a787322])