GLSL Programming/Unity/Cutaways  From Wikibooks, open books for
an open world Jump to: navigation, search Cutaway drawing of the
dome of the Florence cathedral by Filippo Brunelleschi, 1414-36.
This tutorial covers discarding fragments, determining whether
the front face or back face is rendered, and front-face and
back-face culling. This tutorial assumes that you are familiar
with varying variables as discussed in Section “RGB Cube”.  The
main theme of this tutorial is to cut away triangles or
fragments even though they are part of a mesh that is being
rendered. The main two reasons are: we want to look through a
triangle or fragment (as in the case of the roof in the drawing
to the left, which is only partly cut away) or we know that a
triangle isn't visible anyways; thus, we can save some
performance by not processing it. OpenGL supports these
situations in several ways; we will discuss two of them.  Very
Cheap Cutaways[edit]  The following shader is a very cheap way
of cutting away parts of a mesh: all f