Questions about compute coverage in shader

Started by
4 comments, last by JoeJ 6 years, 9 months ago

I googled around but are unable to find source code or details of implementation.
What keywords should I search for this topic?

Things I would like to know:

A. How to ensure that partially covered pixels are rasterized?
   Apparently by expanding each triangle by 1 pixel or so, rasterization problem is almost solved.
   But it will result in an unindexable triangle list without tons of overlaps. Will it incur a large performance penalty?

B. A-buffer like bitmask needs a read-modiry-write operation.
   How to ensure proper synchronizations in GLSL?
   GLSL seems to only allow int32 atomics on image.

C. Is there some simple ways to estimate coverage on-the-fly?
   In case I am to draw 2D shapes onto an exisitng target:
   1. A multi-pass whatever-buffer seems overkill.
   2. Multisampling could cost a lot memory though all I need is better coverage.
      Besides, I have to blit twice, if draw target is not multisampled.
 

Advertisement

Conservative rasterization is what you're looking for.  DX12 and 11.3

-potential energy is easily made kinetic-

32 minutes ago, Infinisearch said:

Conservative rasterization is what you're looking for.  DX12 and 11.3

Exactly.
But how do people workaround this rasterization issue before it?
BTW what is the OpenGL/Vulkan equivalent for this mode?

https://developer.nvidia.com/content/dont-be-conservative-conservative-rasterization

which leads you here:

https://developer.nvidia.com/gpugems/GPUGems2/gpugems2_chapter42.html

and I don't know about opengl/vulkan try googling conservative rasterization along with vulkan or opengl.

-potential energy is easily made kinetic-

Here are details about Conservative Rasterization using GS: http://wwwcg.in.tum.de/fileadmin/user_upload/Lehrstuehle/Lehrstuhl_XV/Research/Publications/2009/eg_area09_shadows.pdf

Poabably the same as in the GPUGems article.

 

Less details here: https://www.seas.upenn.edu/~pcozzi/OpenGLInsights/OpenGLInsights-SparseVoxelization.pdf

But they also talk about some atomic lock maybe interesting for your point B.

This topic is closed to new replies.

Advertisement