Jump to content
  • Advertisement
Sign in to follow this  
jameszhao00

MSAA Confusions

This topic is 2616 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 was reading http://diaryofagraph...d-lighting.html.

One comment in particular was confusing.

[color="#333333"]
It becomes obvious if you try to visualize a 4xMSAA'ed pixel in the lighting stage. Let's say three samples in this pixel use light 0 that is green and one sample uses light 1 with the color red. Averaging the shading won't end up in correct here.[/quote]


If (let's say) 4 samples of normal + z were lit and averaged, why wouldn't that produce the correct result? Is it because we can't reconstruct view/world position per sample because we don't know the sample locations? And therefore can't test light volume in/outness per sample?

Share this post


Link to post
Share on other sites
Advertisement
Actually, it is possible to determine sub-pixel sample locations. You could reconstruct the view or world positions even using pixel centres as well as long as you have per-sample depth values (would be little off).

But averaging the sample values into final pixel is what's happening during resolving, AFAIK. Therefore I too don't understand what's the catch here. I probably didn't read the interesting discussion thoroughly enough :-)

Share this post


Link to post
Share on other sites
http://mynameismjp.wordpress.com/2010/07/07/msaa-sample-pattern-detector/

Found this. Recoving sample position offsets is possible... so... hmm

Share this post


Link to post
Share on other sites
Yeah you can figure out the sample positions experimentally like I did, or in DX11 there is robust support for querying sample positions in the shader (or even interpolating attributes to sample points).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!