Skip to content

Feature Flags

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.


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 define an optional feature flag creates is in the format IRIS_FEATURE_<feature>. For example, if you had:

iris.features.optional=BLOCK_EMISSION_ATTRIBUTE

Then you could check for this with

#ifdef IRIS_FEATURE_BLOCK_EMISSION_ATTRIBUTE

The following is an index of all supported feature flags. Any feature flag marked as “Required For Use” must be set in iris.features.required or iris.features.optional in order to use the feature, otherwise Iris will throw an error.

Feature FlagRequired For UseDescription
BLOCK_EMISSION_ATTRIBUTEQueries support for the block emission attribute (at_midBlock.w)
CAN_DISABLE_WEATHERQueries support for the weather directive
COMPUTE_SHADERSQueries support for compute shaders
CUSTOM_IMAGES✔️Enables custom images
ENTITY_TRANSLUCENTQueries support for gbuffers_entities_translucent
HIGHER_SHADOWCOLOR✔️Enables additional shadowcolor buffers
PER_BUFFER_BLENDINGQueries hardware support for per-buffer blending
REVERSED_CULLINGQueries support for Reverse Shadow Culling
SEPARATE_HARDWARE_SAMPLERS✔️Enables Separate Hardware Shadow Samplers
SSBO✔️Enables SSBOs
TESSELATION_SHADERS / TESSELLATION_SHADERS✔️Enables tesselation shaders