Jump to content
  • Advertisement
Sign in to follow this  
soconne

Retrieve screen pixel in pixel shader

This topic is 5100 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'm trying to implement alpha blending in a CG pixel shader, but I cannot figure out how to get the previous color on the screen to blend the incoming pixel with. Or is there another way to do that? Basically I want to perform the following blend function: glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
Ok, nevermind. All I had to do was enable blending the regular way, then set the OUTPUT color's alpha value to a value other than 0 or 1.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!