Sign in to follow this  
gsamour

Pixel Shader Output doesn't match Final Framebuffer value in PIX

Recommended Posts

[img]http://gsamour.files.wordpress.com/2011/06/framebuffercolorandvaluedifferent.png[/img]

I'm writing out all four channels, but then somehow the rgb channels end up with the Alpha value, and the alpha channel ends up with 1.0... Any ideas? At this point in my render, alpha blending is enabled because I'm doing deferred shading. The current pass is the light pass and it does additive blending.

Any help is appreciated :)

Share this post


Link to post
Share on other sites
[quote name='Hodgman' timestamp='1307504149' post='4820785']
Whats the current blend state, exactly?
[/quote]

Blend Op is ADD, and both SRCBLEND and DESTBLEND are ONE
Blend Op Alpha is also ADD, and both SRCBLENDALPHA and DESTBLENDALPHA are ONE

Share this post


Link to post
Share on other sites
Just in case, I'm also setting D3DRS_SEPARATEALPHABLENDENABLE to FALSE. AFAIK, this means that:

whatever BLENDOP, SRCBLEND, and DESTBLEND are, they're also applied to BLENDOPALPHA, SRCBLENDALPHA, and DESTBLENDALPHA.

Share this post


Link to post
Share on other sites
[quote name='Adam_42' timestamp='1307550416' post='4820967']
What is D3DRS_COLORWRITEENABLE set to?
[/quote]

It's set to 15, which means that all channels are enabled.

Share this post


Link to post
Share on other sites
Ok, I'm pretty sure I know what's going on. My apologies, as it seems the problem is my lack of PIX knowledge. PIX shows the many events a pixel goes through, like render calls. Then it shows the final framebuffer value for the pixel (which really means the final framebuffer value for the pixel's coordinates). I was comparing a render call event when drawing the lights to a render target with the final framebuffer value. Obviously these two will be different since the pixel output value I debugged is for the light render target and the final framebuffer value is the final color on screen after combining the light target with a color target. Thanks for your replies!

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