Creating transparent objects
We have seen that in order to create transparencies we need to:
Enable alpha blending and select the interpolative blending function.
Render the objects back-to-front.
How do we create transparent objects when there is nothing to blend them against? In other words, if there is only one object, how do we make it transparent?
One alternative to do this is to use face culling.
Face culling allows rendering the back face or the front face of an object only. You saw this in the previous Time For Action section when we only rendered the front face by enabling the Back Face Culling button.
Let's use the color cube that we used earlier in the chapter. We are going to make it transparent. For that effect, we will:
Enable alpha blending and use the interpolative blending mode.
Enable face culling.
Render the back face (by culling the front face).
Render the front face (by culling the back face).
Similar to other options in the pipeline, culling is disabled by default. We enable it...