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
:
The define an optional feature flag creates is in the format IRIS_FEATURE_<feature>
. For example, if you had:
Then you could check for this with
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 Flag | Required For Use | Description |
---|---|---|
BLOCK_EMISSION_ATTRIBUTE | ❌ | Queries support for the block emission attribute (at_midBlock.w ) |
CAN_DISABLE_WEATHER | ❌ | Queries support for the weather directive |
COMPUTE_SHADERS | ❌ | Queries support for compute shaders |
CUSTOM_IMAGES | ✔️ | Enables custom images |
ENTITY_TRANSLUCENT | ❌ | Queries support for gbuffers_entities_translucent |
HIGHER_SHADOWCOLOR | ✔️ | Enables additional shadowcolor buffers |
PER_BUFFER_BLENDING | ❌ | Queries hardware support for per-buffer blending |
REVERSED_CULLING | ❌ | Queries support for Reverse Shadow Culling |
SEPARATE_HARDWARE_SAMPLERS | ✔️ | Enables Separate Hardware Shadow Samplers |
SSBO | ✔️ | Enables SSBOs |
TESSELATION_SHADERS / TESSELLATION_SHADERS | ✔️ | Enables tesselation shaders |