Using the Overlay Blend mode with screen effects
For our final recipe, we are going to take a look at another type of blend mode, the Overlay Blend mode. This blend mode actually makes use of some conditional statements that determine the final color of each pixel in each channel. So, the process of using this type of blend mode requires a bit more coding to work. Let's take a look at how this is done in the next few recipes.
How to do it...
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 theProject
tab under theChapter 9
|Shaders
folder and pressing Ctrl + D. Once duplicated, rename the script toScreenOverlay
. 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...