Documentation
Docs/en/reference/effect-format/render-state.md
Effect Render State
Generated reference. Do not edit directly. Update
BuildTools/EffectFormatInterface.json, then runpython BuildTools/docs_effect_format.py --write.
| Index | Syntax | Render state | Resources | Baking | Runtime | Validation | Canonical JSON | Guide |
| Stable ID | Key | Default | Accepted | Behavior | Source |
|---|---|---|---|---|---|
effect-format.option.version |
Version |
310 |
project-defined integer | Version is parsed as an integer and emitted as ‘#version <Version> es’ for glslang input. | Source/Tools/EffectBaker.cpp |
effect-format.option.passes |
Passes |
1 |
project-defined integer | Passes must be in the inclusive range 1..EFFECT_MAX_PASSES. Pass indices in section names and state suffixes are one-based. | Source/Frontend/Rendering.cpp |
effect-format.option.shadow-pass |
ShadowPass |
-1 |
project-defined integer | ShadowPass is -1 for no shadow pass or a one-based pass index in 1..EFFECT_MAX_PASSES. It marks that pass as the model shadow pass. | Source/Frontend/Rendering.cpp |
effect-format.option.blend-func |
BlendFunc or BlendFunc_PassN |
SrcAlpha InvSrcAlpha |
Zero, One, SrcColor, InvSrcColor, DstColor, InvDstColor, SrcAlpha, InvSrcAlpha, DstAlpha, InvDstAlpha, ConstantColor, InvConstantColor, SrcAlphaSaturate |
The value contains exactly two accepted tokens: source factor followed by destination factor. A pass-specific key inherits the unsuffixed default when absent. | Source/Frontend/Rendering.cpp |
effect-format.option.blend-equation |
BlendEquation or BlendEquation_PassN |
FuncAdd |
FuncAdd, FuncSubtract, FuncReverseSubtract, Max, Min |
The value selects one accepted blend equation. A pass-specific key inherits the unsuffixed default when absent. | Source/Frontend/Rendering.cpp |
effect-format.option.depth-write |
DepthWrite or DepthWrite_PassN |
True |
True, False |
The value is parsed as a boolean and provides the default depth-write state for QuadSprite and Model usages when the active target has a depth attachment. A draw may select another state only when DepthVariants is enabled. | Source/Frontend/Rendering.cpp, Source/Frontend/Rendering-SDLGpu.cpp |
effect-format.option.depth-func |
DepthFunc or DepthFunc_PassN |
Always |
Always, Never, Less, LessEqual, Equal, GreaterEqual, Greater, NotEqual |
The value selects one accepted depth comparison. A pass-specific key inherits the unsuffixed default when absent. | Source/Frontend/Rendering.cpp |
effect-format.option.depth-variants |
DepthVariants |
False |
True, False |
Enable this only when callers need to select depth-test and depth-write state per draw. The renderer then builds all four test/write combinations; otherwise only the state declared by DepthWrite and DepthFunc exists. | Source/Frontend/Rendering.cpp, Source/Frontend/Rendering.h |
effect-format.option.cull-variants |
CullVariants |
False |
True, False |
Enable this only when callers need to select None, Back, or Front face culling per draw. Without it, the effect accepts only the default None mode. | Source/Frontend/Rendering.cpp, Source/Frontend/Rendering.h |
effect-format.option.pass-overrides |
<Key>_PassN |
inherit unsuffixed key |
project-defined integer | BlendFunc, BlendEquation, DepthWrite, and DepthFunc support an exact one-based _PassN suffix. Shader sections use a space before PassN instead. | Source/Frontend/Rendering.cpp, Source/Tools/EffectBaker.cpp |
Pass-specific keys use the exact _PassN suffix and inherit the unsuffixed value when absent.