Archived

This topic is now archived and is closed to further replies.

koji187

Order

Recommended Posts

hi i use 2 vertex shaders in my dx app to draw 2d/3d my problem is that nomatter what i do, the 3d shader always is being rendered after the 2d. so i always have my 3d model infront of my text (to put it in a simple way)

Share this post


Link to post
Share on other sites
I may be totally wrong with this but from your description it seems that you''ll simply have to change the order of the DrawPrim calls (the one for the 2d stuff last).

Bjørn.

Share this post


Link to post
Share on other sites
thats what i did but the same happened, for the 3d i''m
currently using the mesh interface from d3dx, could that be
the problem?

Share this post


Link to post
Share on other sites
This should not be a problem. How do you setup the 2d vertices? If you draw the 2d ones at last and the 3d object is infront of the text it seems to be a problem with your z coordinates then. Try to disable the z buffer writes for the 2d stuff and test if this solves the overwrites. Also decrease the rhw value (assuming your using pretransformed and lit vertices for 2d) should solve the problem.

Bjørn.

Share this post


Link to post
Share on other sites