OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3, Eighth Edition
by Dave Shreiner, Graham Sellers, John M. Kessenich, Bill M. Licea-Kane
Procedural Texturing
The fact that we have a full-featured, high-level programming language to express the processing at each fragment means that we can algorithmically compute a pattern on an object’s surface. We can use this freedom to create a wide variety of rendering effects that wouldn’t be possible otherwise. We can also algorithmically compute the content of a volume from which a surface is cut away, as in a wood object made from a tree. This can lead to a result superior to texture mapping the surface.
In previous chapters, we discussed shaders that achieve their primary effect by reading values from texture memory. This chapter focuses on shaders that do interesting things primarily by means of an algorithm defined by the shader. The ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access