Skill Cooling effect-[unity]

Source: Internet
Author: User

Here we mainly discuss the implementation of a similar LOL-capable cooling.


1, the use of Ngui in the filled sprite to achieve. Simply set the type of the sprite of the mask layer to Filled,filldir to Radial360, and then control the fill amount. Such as



2, the use of shader to achieve, the original is also very simple, set an alpha increment mask map, set a threshold, alpha is larger than the threshold of the partial opacity, less than the threshold of transparency, so that we can change the size of this threshold to achieve the desired effect. In shader, to determine whether or not to display based on the size of the alpha value, we can use alpha test, or we can set Alpha to 0 or 1 directly based on the alpha value. For example:

Half4 Frag (v2f i): color{fixed4 C = tex2d (_maintex, I.UV); Fixed a = tex2d (_masktex, I.UV). A;C.A *= a >= _threshold? 0 F:1f;return C;}
The mask map used here is as follows:



Skill Cooling effect-[unity]

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.