Sign in to follow this  
inspired

DX8 Batch Overlapping Blended Textured Quads?

Recommended Posts

I have a textured quad that I am trying to blend onto overlapping locations. So far the only thing that seems to work is separate DrawPrimativeUP for each iteration of the quad. I converted my TriangleStrip quad into a TriangleList quad and then added a second quad. What appears to be happening is that apparently in a buffer somewhere prior to the final blend operation, the last two triangles in my list (the second quad) are overwriting the first two triangles (first quad) without blending, then finally blending the result onto my background. This is not the same thing as blending each quad onto the background, one after the other. Is there a way (in VB6 and DX8) to render a batch of overlapping quads, in a batch, where the later quads will blend with the previous quads (that the batch has already blended onto the background) rather than completely overwrite them?

Share this post


Link to post
Share on other sites
Did you remeber to disable Z writes for the quads? Also for alpha blend modes that not commutative you need to depth sort so you get a consistent blend order.

It not the the same to see green glass behind yellow glass as it is to see yellow glass behind green glass.

Share this post


Link to post
Share on other sites
Thanks!

I found I had forgotten to increase the polygon count in the draw command. Now it works; it does just what I had hoped: it renders each triangle in the list, complete with blending, in order, just as if I had sent separate commands.

Share this post


Link to post
Share on other sites

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