English subtitles

← The Z-Buffer and Transparency - Interactive 3D Graphics

Get Embed Code
3 Languages

Showing Revision 2 created 05/25/2016 by Udacity Robot.

  1. The over operator shows how we can get a transparent effect by blending 2
  2. objects. However, there's one little catch. How does the Z buffer work when
  3. you're using transparent objects. Think about what the Z buffer is dong. It
  4. stores the depth of the object that is closest to the eye. Say, we draw the blue
  5. far object first, then draw and blend in the red transparent object. This works
  6. fine. The blue object's color is taken and blended with the red fragment that is
  7. drawn. However, if we reverse the draw order, we start to get into problems. We
  8. get the red fragment and want to blend it. But we don't even have the blue
  9. object in the Z buffer yet. Even if we decide to wait for the blue object, we
  10. get into trouble. When the blue fragment renders, it is considered hidden by the
  11. red filter, since its farther away from the eye.