Jump to content
  • Advertisement
Sign in to follow this  

single/multipass multitexturing non equal sized textures

This topic is 5045 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 some 2D objects scattered over several textures, 1 set representing the 2D objects and the other representing the shadows/borders of these objects.. These textures dont have the same sizes since the shadows can be much larger than the original objects and I dont want to fit the "normal" objects into the same boxes as the shadows.. The idea is to combine the objects with their shadows, drawing the shadow first and then draw the object over it. Using multi-pass multitexturing I cant seem to get rid of the Z-Fighting.. only when I disable Z testing it works (but I need the Z testing).. for some reason ZBias doesnt seem to work either.. My question is, can I use a pixel shader and draw the biggest quad (the shadow object's box) and in the shader offset the positions of the 2 textures so the object gets centered in its shadow? Or.. can I simply get rid of that Z-Fighting ? Thanks guys.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!