KhronosGroup / KhronosGroup/Vulkan-Docs
Sample Shading and FragCoord interpolation not fully specified for Z and W.
- Dominant language
- JavaScript
- Stars
- 3.3k
- Forks
- 549
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 2
Description
With regard to FragCoord and sample shading, the standard says this:
> When Sample Shading is enabled, the x and y components of FragCoord reflect the location of one of the samples corresponding to the shader invocation.
>
> Otherwise, the x and y components of FragCoord reflect the location of the center of the fragment.
>
> The z component of FragCoord is the interpolated depth value of the primitive.
>
> The w component is the interpolated 1/w.
This makes it clear that the XY components represent the sample being processed. But it doesn't explicitly say that the interpolation for Z and W work the same way, only that they are "interpolated". That is, it doesn't say where it is interpolated *to*, unlike X and Y.
Obviously it wouldn't make sense for X and Y to be interpolated to one of the samples but Z and W not to be. But it doesn't explicitly say.
Also, "depth value of the primitive" probably ought to be "depth value of the fragment".
Contributor guide
Assessment
This issue has not been assessed yet.