SPIR-V Built-In

FrontFacing

Front face determination of a fragment
FrontFacing

Decorating a variable with the FrontFacing built-in decoration will make that variable contain whether the fragment is front or back facing. This variable is non-zero if the current fragment is considered to be part of a front-facing polygon primitive or of a non-polygon primitive and is zero if the fragment is considered to be part of a back-facing polygon primitive.

Valid Usage

VUID-FrontFacing-FrontFacing-04229

The FrontFacing decoration must be used only within the Fragment Execution Model

VUID-FrontFacing-FrontFacing-04230

The variable decorated with FrontFacing must be declared using the Input Storage Class

VUID-FrontFacing-FrontFacing-04231

The variable decorated with FrontFacing must be declared as a boolean value