当前位置:网站首页>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
边栏推荐
- Five pain points for big companies to open source
- Ctfshow, information collection: web5
- Bill Gates posted his resume 48 years ago: "it's not as good-looking as yours."
- Delete a whole page in word
- MySQL bit类型解析
- Niuke real problem programming - day16
- Niuke real problem programming - day15
- 简述keepalived工作原理
- MySQL installation configuration 2021 in Windows Environment
- Find your own value
猜你喜欢
Guangzhou Development Zone enables geographical indication products to help rural revitalization
Protection strategy of server area based on Firewall
C 6.0 language specification approved
CTFshow,信息搜集:web7
Niuke real problem programming - day14
CTFshow,信息搜集:web13
Ctfshow, information collection: web1
【服务器数据恢复】某品牌StorageWorks服务器raid数据恢复案例
Novel Slot Detection: A Benchmark for Discovering Unknown Slot Types in the Dialogue System
拜拜了,大厂!今天我就要去厂里
随机推荐
【數據挖掘】視覺模式挖掘:Hog特征+餘弦相似度/k-means聚類
Jetson AGX Orin CANFD 使用
Compile advanced notes
Niuke real problem programming - Day9
Ctfshow, information collection: web7
Ctfshow, information collection: web5
Today's sleep quality record 78 points
Protection strategy of server area based on Firewall
A laravel background management expansion package you can't miss - Voyager
简述keepalived工作原理
Emqx 5.0 release: open source Internet of things message server with single cluster supporting 100million mqtt connections
STM32F103C8T6 PWM驱动舵机(SG90)
Five pain points for big companies to open source
【服务器数据恢复】戴尔某型号服务器raid故障的数据恢复案例
Navigation — 这么好用的导航框架你确定不来看看?
TypeScript 发布 4.8 beta 版本
什麼是數據泄露
CTFshow,信息搜集:web14
CTFshow,信息搜集:web8
Qu'est - ce qu'une violation de données