Jump to content
  • Advertisement
fllwr0491

2D Questions about compute coverage in shader

This topic is 504 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.
 

Edited by fllwr0491

Share this post


Link to post
Share on other sites
Advertisement
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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!