HOME | DD

#graphics #tutorial
Published: 2023-03-05 09:08:50 +0000 UTC; Views: 49; Favourites: 0; Downloads: 0
Redirect to original
Description
Here's a simple diagram for a tutorial, illustating a problem that can occur when trying to render transparent objects in a depth buffering 3D graphics engine, like OpenGL or DirectX. Read it here:
www.deviantart.com/maximohound…
In this image, the camera is looking at a bottle of wine behind a window. On the top left corner is a view of what the camera sees. The bottle disappears behind the window, leaving the wine floating in the air. This is caused by the way the depth buffer works.
First, the wine (C) is drawn, then the window (A), and finally the bottle (B) is rendered. In the depth buffering algorithm, an object is not drawn on the screen if it appears behind another object that was already drawn. Since the bottle appears behind the window, which was rendered earlier, it is ignored.