Jump to content

  • Log In with Google      Sign In   
  • Create Account

AA and SlimDX


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
3 replies to this topic

#1 riuthamus   Moderators   -  Reputation: 5780

Like
0Likes
Like

Posted 28 June 2012 - 12:00 AM

Attempting to find documention on how to implement this with dx11 and slimdx. Any leads would be much appreciated. We are using deffered rendering, not sure if that helps or not.


Posted Image

Sponsor:

#2 Ashaman73   Crossbones+   -  Reputation: 7991

Like
1Likes
Like

Posted 28 June 2012 - 12:28 AM

There're many ways to implement AA in a deferred rendering pipeline, here is one: FXAA

#3 MJP   Moderators   -  Reputation: 11741

Like
1Likes
Like

Posted 28 June 2012 - 01:04 AM

Implementing MSAA in a deferred renderer is fairly complicated, and the details will vary depending how exactly your renderer is set up. For instance you'll have to do things if you use a traditional deferred rendering setup vs. light prepass vs. tiled deferred rendering in a compute shader. For the first case, some simple steps are as follows:
  • Create your G-Buffer render targets + depth buffer + light accumulation target with MSAA, which you do by creating the Texture2D with a sample count > 1
  • Render the G-Buffer as you normally would
  • For your lighting pass pixel shader, run it at per-sample frequency by taking SV_SampleIndex. If you declare your G-Buffer + depth textures as Texture2DMS, you can use the SampleIndex to access the appropriate subsample from the G-Buffer + depth buffer and apply lighting to it.
  • When you're done rendering to it, resolve the light accumulation target to a non-MSAA texture using ResolveSubresource.
This will work, but will have poor performance. Usually step 3 is optimized by either using a stencil mask or branching to only access all subsamples for pixel where you really need it (usually at triangle edges, or at depth/normal discontinuities). If you're applying lighting in a compute shader that also opens up additional possibilities for optimization.

As an alternative, post-process AA techniques (like FXAA, which was already mentioned) can be applied regardless of your rendering technique. However they have their own set of limitations.

#4 riuthamus   Moderators   -  Reputation: 5780

Like
0Likes
Like

Posted 28 June 2012 - 01:19 AM

We have a dynamic lighting system that we are trying to get to work with some shadow mapping. Would any of these be affected by that?




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