arjan de lumens
Veteran
Umm, now that you have produced a hole, you have produced a situation where you know NOTHING about the samples that used to be in the hole. As such, filling the hole again with anything at all at any time is not safe, even if you later free up a slot in the list.Chalnoth said:No, not really. Here's the way I envison the process:
- Triangle 1 hits the pixel we're looking at. Since there will be a trivial z-pass, a coverage mask will be applied that indicates what portion of this pixel is covered by this triangle.
- Repeat step 1 as above until the maximum number of triangles is reached.
- The N+1 triangle is rendered to the current pixel. The z-comparison is done. The new coverage mask is examined, and the triangle that contributes to the smallest number of samples is discarded.
Note that this hole will now be smaller than any other triangle in the list, so it can never be filled except if other triangles are occluded.
And leaving the hole unfilled means that if you later cover the pixel with 2 polygons sharing an edge (covering the pixel completely), at least one of the polygons will have lost some samples, disturbing the final pixel's color.