To begin our Overlay Screen effect, we will need to get the code of our shader up and running without errors. We can then modify our script file to feed the correct data to the shader:
- Create a new shader by duplicating the ScreenGreyscale code and selecting it from the Project tab under the Chapter 9 | Shaders folder and pressing Ctrl + D. Once duplicated, rename the script to ScreenOverlay. Then, double-click on this shader to open it in your script editor.
- We first need to set up the properties in our Properties block. We will use the same properties from the previous few recipes in this chapter:
Properties { _MainTex ("Base (RGB)", 2D) = "white" {} _BlendTex ("Blend Texture", 2D) = "white"{} _Opacity ("Blend Opacity", ...