Jump to content
  • Advertisement
Sign in to follow this  
AdamStriker

3D on 2D Plane (Z-Fighting)

This topic is 4668 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 currently working on a 3D in 2D project using 3D graphics to draw a 2D game. I'm trying to get weapons fire working on the 2D plane but I'm having trouble with the Z-Buffer. I'm rendering all of the weapons as quads on the 2D plane at the same depth and blending them. With backgroud objects this works fine beacuse it is drawn in the correct order for blending, but in terms of overlapping weapons fire I have problems getting the last drawn weapon (The correctly blended one) to render on top of an earlier drawn weapon. I've looked at a couple of the solutions people have address such as polygon offset and stenciling but I'm not sure which is best for my current problem. Any help/advice would be greatly appreciated.

Share this post


Link to post
Share on other sites
Advertisement
Is there a performance gain from using glDepthMask over glEnable/glDisable(GL_DEPTH_TEST)?

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!