Advertisement

Alpha Blending

Started by December 31, 2002 09:14 PM
4 comments, last by arkmaster 21 years, 10 months ago
If I want to have alpha-blended and non-alpha blended objects in a game, do I need to depth sort all the objects? (I''m using Direct3D). Suppose this: I render a (opaque) tree somewhere. Then I render something that supposed to be alpha blended behind it. Will the alpha-blended object render correctly, or do I need to depth-sort my objects?
Yeah, if you don''t the stuff behind the transparent object won''t get drawn because its behind whats already in the depth buffer. At least thats how it works with OpenGL.
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.
Advertisement
You can first render all non-transparent objects with the z buffer, and then render the remaining transparant polygons in the back to front order, with the z-read still turned on

My Site
quote: Original post by quasar3d
You can first render all non-transparent objects with the z buffer, and then render the remaining transparant polygons in the back to front order, with the z-read still turned on

do you mean z-write turned off?
I don''t know how things are in D3D, but in OGL, you don''t want to disable the Z buffer, just disable the writting in the Z buffer.

Height Map Editor | Eternal lands
quote: Original post by Anonymous Poster
Original post by quasar3d
You can first render all non-transparent objects with the z buffer, and then render the remaining transparant polygons in the back to front order, with the z-read still turned on

do you mean z-write turned off?

Doesn''t really matter. ''cause you have turnet z read off, and transparent polygons are the last polygons you will render, so you don''t need the zbuffer any more



My Site

This topic is closed to new replies.

Advertisement