Expand description
A Shader’s render state as stored (m_ParsedForm): its subshaders, their passes and the passes’ render-state
values, with the BlendMode values they use. crate::material::ShaderData decodes them from a
Shader object; procedural says which shaders build their geometry from component data.
Modules§
- blend_
mode - Unity’s
BlendModevalues (UnityEngine.Rendering.BlendMode) a pass’s blend factors use.
Structs§
- Pass
State - The rest of a pass’s render state as stored (
m_State): every render target’s blend, the depth test and offset and the stencil. - Shader
Pass - A shader pass’s kind and render state: its
LightModetag as stored (Unity upper-cases some:FORWARDBASE), the first render target’s blend factors (Unity’sBlendMode,blend_mode: 0 Zero, 1 One, 5 SrcAlpha, 10 OneMinusSrcAlpha, …), depth writes and culling (0 off, 1 front, 2 back). - Shader
Stencil Op - A stencil face’s operations (
SerializedStencilOp): Unity’sStencilOpfor pass, fail and depth-fail, and itsCompareFunction(0 disabled, 1 never, 2 less, 3 equal, 4 less or equal, 5 greater, 6 not equal, 7 greater or equal, 8 always). - Shader
Target Blend - One render target’s blend and write mask as the pass states them (
rtBlend0tortBlend7): Unity’sBlendModefactors andBlendOpoperations, and the colour mask (bit 0 red to bit 3 alpha). - Shader
Value - A render-state value of a shader pass: the value the shader declares, and the material property it is bound to
(
Blend [_SrcBlend] ...), which then gives the value. - SubShader
- A subshader: its tags as stored (Unity upper-cases some keys:
QUEUE) and its passes in order.
Enums§
- Pass
Kind - What a pass is (
m_Type): one with its own state and programs, aUsePassnaming another shader’s pass (m_UseName, its state not here), or aGrabPasscopying the screen to a texture (it draws nothing).
Functions§
- procedural
- Whether a shader builds its geometry from component data, drawing a placeholder mesh: Shapes (a widely used package’s line, disc, triangle and sphere shaders).