Sign in to follow this  

single/multipass multitexturing non equal sized textures

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

This topic is 4734 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.

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