Hey, I’m trying to make my engine support 2D rendering with Direct3D.
I can do that with:
Now, I would like depth buffering enabled for 2D. But I don’t want it to
interfere with the 3D graphics
(2D should always render “on top of” the 3D graphics)
What can I do to achieve that?
Please log in or register to post a reply.
Render the 3D graphics, then clear the depth buffer, and render the 2D
You could save on some fillrate by reusing the depth buffer if you deal
with opaque overlaps, but quite often I use transparency where I have to
use a painters algorithm anyway. In this case I just disable depth
reads/writes. Teh google found me
(see DepthEnable / DepthWriteMask).