Jump to content
  • Advertisement
Sign in to follow this  
larskendall

Sprite Transparency on Render Target

This topic is 3787 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 working on a render engine that is based on a post processing architecture. Recently I've made the addition of 2D rendering using the ID3DXSprite interface. The problem is that when I render sprites onto a render target that isn't the backbuffer, none of the alpha blending works correctly. I've tested the same code with post processing disabled, rendering directly to the backbuffer and it works perfectly. When I've viewed it in PIX it appears that the sprite is copying its alpha data directly onto the render target, rather than blending its color. Does anybody know a solution for this? I could just write my own sprite library and render them using shaders so that I have total control, but I would prefer the simplicity and speed of using ID3DXSprite.

Share this post


Link to post
Share on other sites
Advertisement
I figured out how to get transparency working, although I'm not completely sure why it's working now.

It didn't actually have anything to do with ID3DXSprite, and the backbuffer had no significance. In my setup for post processing I had been setting all four render targets every frame and when I reduced it to only the first, everything worked perfectly. Since that's the only one I'm using at the moment it doesn't cause any problems for me, but I'm still a bit unsure about this solution.

If anybody knows why this fixed it I'd be very curious to find out.

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!