Jump to content

  • Log In with Google      Sign In   
  • Create Account


How to rasterize a triangle even if it's not covering pixel center


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 n3Xus   Members   -  Reputation: 700

Like
0Likes
Like

Posted 22 August 2012 - 11:15 AM

I have a very low resolution render target in which I render light volumes. The problem is that it's so low-res that the triangles of the light bounding sphere geometry don't even get rasterized unless they're large (relative to the screen surface area) or directly at the pixel center. This is causing severe popping.

I guess one way would be to dynamically adjust light volume size, but are there any methods to trick the rasterizer to draw the triangle anyway?

Sponsor:

#2 MJP   Moderators   -  Reputation: 10648

Like
2Likes
Like

Posted 22 August 2012 - 03:42 PM

This is called "conservative rasterization", and isn't supported by GPU's. Using MSAA helps by adding more sample points, but isn't really a solution. The only way I know of to do it on graphics hardware is to enlarge your triangles by an amount large enough to ensure they cover the sample points. This older article discusses how to do that using DX9-era hardware. But if you're using DX10-capable hardware you can do it on-the-fly in a geometry shader. You can also avoid the corner issue by discarding fragments in the corner in the pixel shader, rather than adding more edges to your triangle. This is the approach used by Cyril Crassin in his GPU voxelization pipeline.

#3 n3Xus   Members   -  Reputation: 700

Like
0Likes
Like

Posted 22 August 2012 - 04:16 PM

Very nice, thanks!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS