Introducing shaders
We created materials in the previous chapter, but we never discussed how they internally work and why their Shader properties are super important. In this section, we will explore the concept of a shader as a way to program a video card to achieve custom visual effects.
In this section, we will cover the following concepts related to shaders:
- Shader pipeline
- The render pipeline and URP
- URP's built-in shaders
Let's start by discussing how a shader modifies the shader pipeline to achieve effects.
Shader pipeline
Whenever a video card renders a 3D model, it needs several pieces of input data to process, such as meshes, textures, the transform of the object (position, rotation, and scale), and the lights that affect that object. With that data, the video card must output the pixels of the object into the back buffer, the image where the video card will be drawing our objects. That image will be shown when Unity finishes rendering...