super small distant renderables

Started by
1 comment, last by MJP 10 years, 6 months ago

Hi,

I have quite a question towards GPU rasterizing mechanizm. Consider a mesh that covers only 1x2 pixels in my render target, but, is consisting of 10000 triangles. How exactly are those two pixels shaded if every resterized triangle covers only 1% of the pixel, an extremly small area? I have heard that GPU, when rasterizing a triangle, it makes sure that only exactly one pixel is written to (in the manner of whole rasterized geometry or a rasterized triangle primitive?). I wonder for this, becouse, I would like to use my own technique of LOD. But not down detailed geometry aproach, but down detailed shader aproach: in case of high fill rate (close to camera) I would compute as much as possible in vertex function, and in oposite extreme, I would do nothing but vertex position transform in vertex function, and fire all routine to pixel function, in case that pixel function will run only twice in case of 1x2 scenario. But this fact is vital towards this idea. So I wonder how rasterizer works in this extreme.

Advertisement

There are 3 rules for triangle rasterization, you can find them at http://msdn.microsoft.com/en-us/library/windows/desktop/cc627092%28v=vs.85%29.aspx

A triangle is shaded for a pixel if the rasterization sample point is covered by the triangle. So most of your triangles will never get shaded at all, and those 1 or 2 pixel will alias like hell as the sample point rapidly shifts from one triangle to another due to camera or object movement.

This topic is closed to new replies.

Advertisement