SPIR-V Built-In

BaryCoordSmoothCentroidAMD

Barycentric coordinates of a fragment centroid
BaryCoordSmoothCentroidAMD

The BaryCoordSmoothCentroidAMD decoration can be used to decorate a fragment shader input variable. This variable will contain the (I,J) pair of the barycentric coordinates corresponding to the fragment evaluated using perspective interpolation at the centroid. The K coordinate of the barycentric coordinates can be derived given the identity I + J + K = 1.0.

Valid Usage

VUID-BaryCoordSmoothCentroidAMD-BaryCoordSmoothCentroidAMD-04175

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

VUID-BaryCoordSmoothCentroidAMD-BaryCoordSmoothCentroidAMD-04176

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

VUID-BaryCoordSmoothCentroidAMD-BaryCoordSmoothCentroidAMD-04177

The variable decorated with BaryCoordSmoothCentroidAMD must be declared as a two-component vector of 32-bit floating-point values