Default Pass Startup State Shader Configurations

The state shaders are not necessarily needed in your shading pipeline, as the engine has default implemented behaviours.

Here are the default behaviours applied at the startup of each rendering pass in the engine. Blended materials passes startup state is identical to master passes startup state:

Pass ID

Blending Mode

Depth Mode

RED::MTL_PRELIT

No blending:

ONE * SRC_COLOR + ZERO * DEST_COLOR

Depth test = ON

Depth write = ON

Depth equation = LEQUAL

RED::MTL_LIT

Additive blending:

ONE * SRC_COLOR + ONE * DEST_COLOR

Depth test = ON

Depth write = OFF

Depth equation = LEQUAL

RED::MTL_POSTLIT

Additive blending:

ONE * SRC_COLOR + ONE * DEST_COLOR

Depth test = ON

Depth write = OFF

Depth equation = LEQUAL

RED::MTL_RAYTRACE

N/A

N/A

RED: :MTL_INDIRECT_PRELIT

No blending: ONE *

SRC_COLOR + ZERO * DEST_COLOR

N/A

RED::MTL_INDIRECT_LIT

Additive blending:

ONE * SRC_COLOR + ONE * DEST_COLOR

N/A

RED::MTL_INDIRECT_POSTLIT

Additive blending:

ONE * SRC_COLOR + ONE * DEST_COLOR

N/A

When handling true transparent objects (RED::StateShader::SORTED_TRANSPARENCY setup) all depth functions must be replaced by EQUAL instead of LEQUAL. All other state default values are given by the RED::StateShader default class creation values and do not rely on the current pass being rendered.