Jump to content

  • Log In with Google      Sign In   
  • Create Account


writing to all 4 channels without the Alpha affecting the RGB


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Wilhelm van Huyssteen   Members   -  Reputation: 950

Like
0Likes
Like

Posted 07 January 2014 - 01:42 AM

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!



Sponsor:

#2 C0lumbo   Crossbones+   -  Reputation: 2195

Like
0Likes
Like

Posted 07 January 2014 - 01:59 AM

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.



#3 Wilhelm van Huyssteen   Members   -  Reputation: 950

Like
0Likes
Like

Posted 08 January 2014 - 01:19 AM

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






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS