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. ...

Get Unity 2021 Shaders and Effects Cookbook - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.