Render States
You can control render states in your shaders using this syntax anywhere outside of functions.
RenderState( BlendEnable, true );Name | Description | Values |
|---|---|---|
FillMode | Determines how polygons are rendered (solid faces or wireframe edges). |
|
CullMode | Specifies which faces (front, back, or none) are culled from rendering. |
|
DepthBias | Enables or disables depth bias to adjust depth values for rendering order. |
|
DepthBiasClamp | Enables or disables clamping of depth bias to a set range. |
|
SlopeScaleDepthBias | Enables or disables slope-scaled depth bias for polygons. |
|
DepthClipEnable | Enables or disables clipping of geometry against the near/far depth planes. |
|
MultisampleEnable | Enables or disables multisample anti-aliasing. |
|
SampleMask | Controls which samples in a multisample target are updated. |
|
DepthEnable | Enables or disables depth testing. |
|
DepthWriteEnable | Enables or disables writing to the depth buffer. |
|
DepthFunc | Comparison function for depth testing. |
|
StencilEnable | Enables or disables stencil testing. |
|
StencilReadMask | Mask for reading stencil buffer values. |
|
StencilWriteMask | Mask for writing stencil buffer values. |
|
StencilFailOp | Action when stencil test fails. |
|
StencilDepthFailOp | Action when stencil test passes but depth test fails. |
|
StencilPassOp | Action when both stencil and depth tests pass. |
|
StencilFunc | Comparison function for front-face stencil test. |
|
BackStencilFailOp | Action for back-facing polygons when stencil test fails. |
|
BackStencilDepthFailOp | Action for back-facing polygons when depth test fails. |
|
BackStencilPassOp | Action for back-facing polygons when both tests pass. |
|
BackStencilFunc | Comparison function for back-face stencil test. |
|
StencilRef | Reference value used in stencil tests. |
|
AlphaToCoverageEnable | Enables alpha-to-coverage for multisampling. |
|
BlendEnable | Enables or disables blending. |
|
IndependentBlendEnable | Allows blending settings to differ between render targets. |
|
SrcBlend | Source factor for RGB blend. |
|
DstBlend | Destination factor for RGB blend. |
|
BlendOp | Operation applied to RGB blend factors. |
|
SrcBlendAlpha | Source factor for alpha blending. |
|
DstBlendAlpha | Destination factor for alpha blending. |
|
BlendOpAlpha | Operation applied to alpha blend factors. |
|
ColorWriteEnable0 | Channels to write for render target 0. |
|
ColorWriteEnable1 | Channels to write for render target 1. |
|
ColorWriteEnable2 | Channels to write for render target 2. |
|
ColorWriteEnable3 | Channels to write for render target 3. |
|
SrgbWriteEnable0 | Enables sRGB write conversion for render target 0. |
|
SrgbWriteEnable1 | Enables sRGB write conversion for render target 1. |
|
SrgbWriteEnable2 | Enables sRGB write conversion for render target 2. |
|
SrgbWriteEnable3 | Enables sRGB write conversion for render target 3. |
|
BlendFactor | Enables use of a constant blend factor. |
|
HighPrecisionBlendEnable | Enables high-precision blending. |
|
AlphaTestEnable | Enables alpha testing. |
|
AlphaTestRef | Reference value for alpha testing. |
|
AlphaTestFunc | Comparison function for alpha testing. |
|