As you already know, there are three types of Render Pipeline in Unity. By default, there is the Built-in RP that corresponds to the oldest engine belonging to the software, in contrast, Universal RP and High-Definition RP belong to a type of Render Pipeline called Scriptable RP, which is more up-to-date and has been pre-optimized for better graphics performance.
Regardless of the Render Pipeline , if you want to generate an image on the screen, you have to travel through the pipeline.
A pipeline can have different processing paths, known as Render Paths; as if the example pipeline in section 1.0.7 had more than one way to reach its destination.
A Render Path corresponds to a series of operations related to lighting and shading objects. This allows you to graphically process an illuminated scene (e.g., a scene with directional light and a sphere).
Among them you can find:
- Forward Rendering.
- Deferred Shading.
- Legacy deferred.
- Legacy vertex lit.
Each of these has different capabilities and performance characteristics.
In Unity, the default Rendering Path corresponds to Forward Rendering; this is the initial path for the three types of Render Pipeline that are included in Unity (Built-in, Universal, and High-Definition). This is because it has greater graphics card compatibility and a lighting calculation limit, making it a more optimized process.
To understand this concept, imagine an object and a direct light in a scene. The interaction between them is based on the following two fundamental concepts:
- Lighting characteristics.
- Object material characteristics.
Such interaction is called the lighting model.
The basic lighting model corresponds to the sum of three different properties:
- Ambient color.
- Diffuse reflection.
- Specular reflection.
The lighting calculation is carried out within the shader and can be done by vertex or fragment. When the illumination is calculated by vertex it is called Per-Vertex Lighting and performed in the Vertex Shader Stage. Likewise, when it is calculated by fragment it is called Per-Fragment or Per-Pixel Lighting and is performed in the Fragment Shader Stage.