O'Reilly logo

Unity 5.x Shaders and Effects Cookbook by Kenneth Lammers, Alan Zucconi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 blending 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 needs a bit more coding to work. Let's take a look at how this is done in the next few recipes.

Getting ready

For this last Screen Effect, we will need to set up our two scripts as we have in the previous recipes in this chapter. For this recipe, we will be using the same scene we have been using, so we don't have to create a new one:

  1. Create a new script file called Overlay_ImageEffect and shader file called Overlay_Effect ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required