Description
FragStencilRefEXT
-
Decorating a variable with the
FragStencilRefEXT
built-in decoration will make that variable contain the new stencil reference value for all samples covered by the fragment. This value will be used as the stencil reference value used in stencil testing.To write to
FragStencilRefEXT
, a shader must declare theStencilRefReplacingEXT
execution mode. If a shader declares theStencilRefReplacingEXT
execution mode and there is an execution path through the shader that does not setFragStencilRefEXT
, then the fragment’s stencil reference value is undefined for executions of the shader that take that path.Only the least significant s bits of the integer value of the variable decorated with
FragStencilRefEXT
are considered for stencil testing, where s is the number of bits in the stencil framebuffer attachment, and higher order bits are discarded.See fragment shader stencil reference replacement for more details.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.