FragCoord(3)
Description
FragCoord-
Decorating a variable with the
FragCoordbuilt-in decoration will make that variable contain the coordinates (x,y,z,1/w) of the fragment being processed.The (x,y) values are the framebuffer coordinates (xf,yf) of the fragment.
When Sample Shading is enabled, the x and y components of
FragCoordreflect the location of one of the samples corresponding to the shader invocation.Otherwise, the x and y components of
FragCoordreflect the location of the center of the fragment.The z component of
FragCoordis the interpolated depth value of the primitive.The w component is the interpolated .
The
Centroidinterpolation decoration is ignored, but allowed, onFragCoord.
Document Notes
For more information, see the Vulkan Specification (NOTE: cannot determine Specification page containing this refpage).
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.