Chapter 7: Vertex Functions
The term shader originates from the fact that C for Graphics (Cg) has been mainly used to simulate realistic lighting conditions (shadows) on three-dimensional (3D) models. Despite this, shaders are now much more than that. They not only define the way objects are going to look, but they can also redefine their shapes entirely. If you want to learn how to manipulate the geometry of a 3D object via shaders, this is the chapter for you.
In Chapter 2, Creating Your First Shader, we explained that 3D models are not just a collection of triangles. Each vertex can contain data that is essential to render the model itself correctly. This chapter will explore how to access this information in order to use it in a shader. ...
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