We’ve learned that in order to create transparency, we need to:
- Enable alpha blending and select the interpolative blending function
- Render the faces of objects back to front
How do we create transparent objects when there is nothing to blend them against? In other words, if there’s only one object, how can we make it transparent? One solution is to use face-culling.
Face-culling allows us to only render the back or front face of an object. We used this technique in the previous section when we only rendered the front face by enabling the Back Face Culling button.
Let's use the color cube from earlier in this chapter. We are going to make it transparent. For that effect, we will perform the following:
- Enable alpha blending and use the interpolative blending mode.
- Enable face-culling.
- Render the back face (by culling the front...