Making sure it's rendered behind everything
Hey
How can i make sure something will never be infront of anything else . I don''t want any hacks here , i guess it''s a zbuffer state
thx
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 .
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.
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.
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
Dreddnafious Maelstrom
"If I have seen further, it was by standing on the shoulders of Giants"
Sir Isaac Newton
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement