[Unity Shaders] uses Unity Render Textures to implement screen effects-Overlay hybrid mode in screen effects, shadersunity

Source: Internet
Author: User

[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!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.