Dave B(TotalVR)
Regular
Apologies for blatent tiler promotion but....
Say I have my 32x16 tile and I am rasterising it. The Rasteriser determines which pixels a triangle lay under. So have another 32x16 buffer corresponding to rendered pixels that the rasteriser increments for each pixel under the current triangle.
So in the end, when all the triangles are rasterised, you will have a buffer that is mostly 1's, but at the triangle edges will be 2's, and at multiple triangle intersections will be greater.
Now the tiler has the job of rendering the scene. The new buffer can be used to determine how many AA samples must be taken per pixel. Where there is a 1 you only need 1 because you are inside a triangle. With a 2 you need more, one from either triangle. Where there is a triangle fan you might have 12 triangles under the same pixel, so take 12 samples - or up to an upper limit.
This buffer could of course be multiplied according to what kind of AA quality you desire. Double all the numbers in the buffer then subtract 1 and you have a higher level of edge AA'ing but no more AA'ing inside the triangle.
There is the possible problem of 'I need to take 3 samples on this pixel, where do I take them from'. Instead of just a preset grid; perhaps have another component of the buffer which points to sample positions determined by the rasteriser.
Picture a square bisected by a line (the pixel by the tri boundary). You have a number of possible results.
2 triangles (top left to bot right)
2 rectangles (across or down the middle)
1 triangle and 1 triangle+rhombus (somewhere inbetween)
Determine the most centre point of these shapes and you have your sample position.
Determine the area of the shapes produced by the pixel bi-section and you have the information you need for correct weighting of your AA sample blend coefficient.
What do you think? Genius or Penius?
Dave
Say I have my 32x16 tile and I am rasterising it. The Rasteriser determines which pixels a triangle lay under. So have another 32x16 buffer corresponding to rendered pixels that the rasteriser increments for each pixel under the current triangle.
So in the end, when all the triangles are rasterised, you will have a buffer that is mostly 1's, but at the triangle edges will be 2's, and at multiple triangle intersections will be greater.
Now the tiler has the job of rendering the scene. The new buffer can be used to determine how many AA samples must be taken per pixel. Where there is a 1 you only need 1 because you are inside a triangle. With a 2 you need more, one from either triangle. Where there is a triangle fan you might have 12 triangles under the same pixel, so take 12 samples - or up to an upper limit.
This buffer could of course be multiplied according to what kind of AA quality you desire. Double all the numbers in the buffer then subtract 1 and you have a higher level of edge AA'ing but no more AA'ing inside the triangle.
There is the possible problem of 'I need to take 3 samples on this pixel, where do I take them from'. Instead of just a preset grid; perhaps have another component of the buffer which points to sample positions determined by the rasteriser.
Picture a square bisected by a line (the pixel by the tri boundary). You have a number of possible results.
2 triangles (top left to bot right)
2 rectangles (across or down the middle)
1 triangle and 1 triangle+rhombus (somewhere inbetween)
Determine the most centre point of these shapes and you have your sample position.
Determine the area of the shapes produced by the pixel bi-section and you have the information you need for correct weighting of your AA sample blend coefficient.
What do you think? Genius or Penius?
Dave