Jump to content
  • Advertisement
Sign in to follow this  
Vortex_Asura

2D layers in D3D9, quick question

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

Is it possible to emulate 2D layers in D3D9 by having one 2D plane normal to the z-axis at z=0 and then a second one also normal to the z-axis, but closer to the viewer and then rescale it so the textures are normal-sized again?
I assume there are better options to do this?

Share this post


Link to post
Share on other sites
Advertisement
If you are trying to draw stuff in 2d for a UI or overlay of some sort, what you want is an orthographic projection matrix. Render your stuff back to front.

Share this post


Link to post
Share on other sites
Rather than trying to map 2d screen coordinates to 3d you could just render the layers in back to front order with Z test off. I'd suggest this approach!

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!