Reputation: 1985
Why are all of the four fragments of a quad fragment going to be shaded (calculating their color), if a triangle (polygon) for example, covers only one of them?
Upvotes: 0
Views: 527
Reputation: 18015
Texturing requires derivatives of the texture coordinates passed in. This is because which mip-map to use depends on the variation of the texture coordinates in screen space. if the coordinates vary fast, then it means you're in fact using a large part of the texture on that one fragment (so the mipmap that will get picked is closer to the 1x1 level)
"Derivatives" here is the variation of the input coordinates per fragment. The typical way graphics cards implement this is to compute the coordinates on a 2x2 grid, and compute the difference between the different elements to get an approximation of the derivative.
Upvotes: 6
Reputation: 283634
The average color of the fragment still depends on those other vertices.
Upvotes: 3