[Unity Shaders] uses Unity Render Textures to implement screen effects-Overlay hybrid mode in screen effects, shadersunity
This series mainly references the book "Unity Shaders and Effects Cookbook" (thanks to the author of the original book) and adds a bit of personal understanding or expansion.
Here are all the illustrations in this book. Here is the code and resources required for this book (you can also download them from the official website ).
========================================================== ===================================================== =====
Preface
In this article, we will learn another hybrid mode, Overlay. This hybrid mode uses a condition judgment statement to determine the final pixel value. Therefore, the computation used here is a little more complex (in fact, it is also very simple ).
Let's review the formula used for superposition:
Where a is the base color and B is the mixed color.
Preparations
Implementation
This code is very simple and does not need to be modified. The changes are as follows:
Overlay hybrid modeOpacity = 1.0:
Explanation
The overlapping effect is actually a combination of Multiply and Screen. It determines the mixed mode by determining the color value of each channel.
This is the last section of the image effect chapter ~ As you can see, image effects contain a lot of knowledge and content. It relies heavily on your platform and the memory capacity allocated to image effects. So enjoy and play with special effects as much as possible ~
Special effects in unity3d
We recommend that you use C # To write code. Close-up mainly uses unity particles.
How can Unity3D lens jitter be achieved? For example, the jitter in scenarios after an explosion (achieved by lens jitter or screen jitter)
The reward is + 100. I will send you the script I wrote. Screen jitter!