Sign in to follow this  
EternityZA

writing to all 4 channels without the Alpha affecting the RGB

Recommended Posts

EternityZA    1226

Hi.

 

Im trying to optimize my crude rendering pipeline a bit. I have a couple of offscreen textures that I render to using FBO's (and multiple render targets). Until now they've all been 3 channel textures. Now i want to use 4 channel textures so i can store more in a texture and use less textures overall. But even if i disable blending the RGB values still gets multiplied by the alpha when I render to a 4 channel texture.  How do I prevent this from happening? I want the RGBA values that got set as output in the fragment shader to be written to the texture as is with no further calculation.

 

Thnx in Advance!

Share this post


Link to post
Share on other sites
C0lumbo    4411

With alpha blending disabled, the value your shader writes out should be the value that ends up in your render-to-texture target. You might want to double check alpha blending really is disabled and that your pixel shader isn't doing the multiply.

 

Another possibility is that perhaps your code is correct when you're doing the bit when the RTT is the render target, but you have alpha blending enabled when you're rendering using the RTT as the texture source. That would result in similar symptoms.

Share this post


Link to post
Share on other sites
EternityZA    1226

Yes in the end it was just the fact that blending wasnt disabled at all the places where it should have been disabled. Thought there was a more interesting reason why it would do that ^^

 

Thnx

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