Archived

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

Joe Forhens

Making sure it's rendered behind everything

Recommended Posts

Z-buffer IS enabled , if i do this and another object is further then it will be drawn behind what i want to be rendered last . The solution should be fairly easy to implement if i''m not mistaken it has to do with ZENABLE and ZBIAS render states . I just want to be sure .

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
1) Disable z-testing/z-writing.
2) Render background object(s).
3) Enable z-testing/z-writing.
4) Render foreground object(s).

Z-bias is something different. It''s used to prevent ''z-buffer fighting'' when rendering (nearly) co-planar polygons.

Share this post


Link to post
Share on other sites
You could also implement your own sorting routine and then have complete control over your render order. the advantage is that once you code it you can use it in several other portions of your engine. This will also allow for a bunch of cool effects with alpha''d billboards and point sprites later down the road.

Dreddnafious Maelstrom

"If I have seen further, it was by standing on the shoulders of Giants"

Sir Isaac Newton

Share this post


Link to post
Share on other sites