Our individual layers for our old film screen effect are quite simple, but when combined, we get some very visually stunning effects. Let's run through how to construct the code for our script and shader, then we can step through each line of code and learn why things are working the way they are. At this point, you should have the screen effects system up and running, as we will not be covering how to set this up in this recipe.
- We will begin by entering the code in our script. Our first step in modifying our script is to rename the class to match our filename, RenderOldFilm:
[ExecuteInEditMode]public class RenderOldFilm : MonoBehaviour {
- The first block of code that we will enter will define the variable that we want ...