Sign in to follow this  

Sprite Transparency on Render Target

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

This topic is 3572 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.

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