Sign in to follow this  
Endemoniada

Disable MSAA for Rendering Depth and Normals ?

Recommended Posts

Endemoniada    430

Hi guys,

 

When I render (generate) my depth and normals to a screen-sized texture for post-processing stuff like SSAO (not for deferred rendering) do I turn off MSAA ? If not, do I have to resolve the depth and normal textures I generated ?

 

I'm confused.

 

Thanks.

 

Share this post


Link to post
Share on other sites
Hodgman    51326

Using a built-in resolve on "data" (as opposed to "images") usually doesn't make any sense / doesn't give a sensible result.

 

You should either not use MSAA for these kinds of textures, OR, you need to manually read each of the sub-pixel samples and perform your shading algorithm on each sub-pixel sample, instead of on each pixel! The latter is obviously much slower (the same cost as brute-force super-sampling), so you generally need to use a technique that detects if a pixel is on the edge of a triangle or not, and only perform this sub-pixel accurate shading on edge pixels.

 

e.g. here's a sample that does this for a gbuffer:

http://humus.name/index.php?page=3D&ID=81

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this