当前位置:网站首页>Unity's ASE realizes cartoon flame

Unity's ASE realizes cartoon flame

2022-07-07 15:06:00 PassionY

One . Preface

Generally, we realize the fire effect in the game , All through particle effects , Although the effect is good , But with particle effects , If there are too many particles , Will take up a lot of cpu performance , Even cause the frame to jam . So I'm going to use shader Achieve a flame effect , hold cpu Pressure transferred gpu Up . And it works better .
Look at the effect :
 Insert picture description here

Two . Implementation logic

The realization of this effect is mainly divided into 3 Parts of

1. Realize the fluctuation effect of flame

Through a dot chart , Scale different sizes separately , Staggered upward translation , Realize the fluctuation effect of flame .
Then through a flame shape mask diagram , Get the basic shape of the flame
 Insert picture description here

2. adopt step function , Separate and color the inner flame from the outer flame . Get a colored flame .

 Insert picture description here

3. Implement a gradient , Make the flame more realistic .

 Insert picture description here

原网站

版权声明
本文为[PassionY]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207071301516782.html