Jump to content
  • Advertisement
Sign in to follow this  
inspired

DX8 Batch Overlapping Blended Textured Quads?

This topic is 4477 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 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!