当前位置:网站首页>Unity's ASE achieves full screen sand blowing effect
Unity's ASE achieves full screen sand blowing effect
2022-07-07 15:07:00 【PassionY】
Preface
Recently, I was working on a desert environment 2D game , It needs to add a full screen special effect of sandstorm , Originally, we used particle effects , But later I found , There are a lot of particles , Performance consumption is very high . And because it is full screen sandstorm , When the particle effect area is too large , When there are too many layers , Caused by the overdraw An increase in , Can make cpu More stressful . Even eventually, our game will get stuck when switching between front and back stages .
therefore , We finally plan to use shader To achieve a sandstorm effect , Although it can't completely simulate the effect of particles , But basically restore 90% The wind and sand effect .
Look at the renderings first :
Realization principle
1. Realization of wind principle : Use a flowing noise map , Realize the image of clouds UV Disturbance .
2. Sand realize principle : First let the grainy or strip picture translate in the wind , Then use a noise map R The channel kicks out the translation result of sand , Finally, multiply by a superimposed color .
Noise interference
The flow principle of noise map is shown in the figure below :
Attribute setting of wind

Attribute setting of sand
边栏推荐
- Ctfshow, information collection: web14
- A laravel background management expansion package you can't miss - Voyager
- 最安全的证券交易app都有哪些
- Lidar Knowledge Drop
- Cocoscreator resource encryption and decryption
- Cocoscreator operates spine for animation fusion
- Navigation — 这么好用的导航框架你确定不来看看?
- Summary on adding content of background dynamic template builder usage
- Ctfshow, information collection: Web3
- Apache multiple component vulnerability disclosure (cve-2022-32533/cve-2022-33980/cve-2021-37839)
猜你喜欢

In the field of software engineering, we have been doing scientific research for ten years!

Summer safety is very important! Emergency safety education enters kindergarten

Ctfshow, information collection: web8

#yyds干货盘点# 解决名企真题:交叉线

CTFshow,信息搜集:web13

Ctfshow, information collection: web13

What is cloud primordial? This time, I can finally understand!

Ctfshow, information collection: web14

Wechat applet - Advanced chapter component packaging - Implementation of icon component (I)

Niuke real problem programming - day14
随机推荐
Ctfshow, information collection: web12
buffer overflow protection
PD virtual machine tutorial: how to set the available shortcut keys in the parallelsdesktop virtual machine?
【目标检测】YOLOv5跑通VOC2007数据集
Ctfshow, information collection: web10
Apache multiple component vulnerability disclosure (cve-2022-32533/cve-2022-33980/cve-2021-37839)
CTFshow,信息搜集:web14
Ctfshow, information collection: web6
Niuke real problem programming - Day9
Several ways of JS jump link
JSON解析实例(Qt含源码)
知否|两大风控最重要指标与客群好坏的关系分析
Cocoscreator operates spine for animation fusion
Electronic remote error
Notes HCIA
The method of parsing PHP to jump out of the loop and the difference between continue, break and exit
2022年5月互联网医疗领域月度观察
Cocoscreator resource encryption and decryption
Full details of efficientnet model
[Yugong series] go teaching course 005 variables in July 2022