September 2018
Intermediate to advanced
472 pages
15h 36m
English
It is straightforward to use the GLSL discard keyword in combination with noise to simulate erosion or decay. We can simply discard fragments that correspond to a noise value that is above or below a certain threshold. The following image shows a teapot with this effect.
Fragments are discarded when the noise value corresponding to the texture coordinate is outside a certain threshold range:

Read now
Unlock full access