Advertisement Jump to content
Sign in to follow this  
EternityZA

writing to all 4 channels without the Alpha affecting the RGB

This topic is 1840 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

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
Advertisement

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

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