当前位置:网站首页>【Unity Shader 消融效果_案例分享】
【Unity Shader 消融效果_案例分享】
2022-07-01 06:19:00 【卷王来袭】
1.实现逻辑
消融效果主要是利用了Shader中的clip()函数,也就是透明测试功能,在ASE中叫“Opacity Mask”。
消融效果是基于一张“Noise”纹理图就行计算的,“Noise”纹理图灰度区间在 [0,1] 。
开始先将纹理图加上一个数值 “v = 1” ,使纹理上灰度值的区间变为 [1 , 2]。
然后逐渐减少v值,当 “v = -1” 时,纹理上灰度值当区间就变成 [-1 , 0]。
把纹理的变化过程传给Cilp()函数就可以实现模型逐渐消融的效果,并且可以通过v的数值来控制消融的程度,数值的范围在**[-1 , 1]**。
2.资源准备
“Noise”纹理图是在Photoshop中进行绘制的。
方法如下:
在Photoshop中创建一个512*512的灰度图。

点击滤镜->渲染->云彩,为当前图生成Noise纹理。

点击菜单图像->自动色调,使用图像中最暗的像素灰度值达到0、最亮的像素灰度值达到255。
边栏推荐
- 10-golang运算符
- 69 Cesium代码datasource加载geojson
- Golang panic recover custom exception handling
- PLA not pasted on the bed: 6 simple solutions
- JDBC connection pool
- Restframework-simplejwt rewrite authentication mechanism
- Flink practice -- multi stream merge
- SQL语句
- Excel visualization
- 【ManageEngine卓豪】助力黄石爱康医院实现智能批量化网络设备配置管理
猜你喜欢

MongoDB:一、MongoDB是什么?MongoDB的优缺点

Application of IT service management (ITSM) in Higher Education
![[enterprise data security] upgrade backup strategy to ensure enterprise data security](/img/59/e44c6533aa546e8854ef434aa64113.png)
[enterprise data security] upgrade backup strategy to ensure enterprise data security

Index method and random forest to realize the information of surface water body in wet season in Shandong Province
![[self use of advanced mathematics in postgraduate entrance examination] advanced mathematics Chapter 1 thinking map in basic stage](/img/54/f187e22ad69f3985d30376bad1fa03.png)
[self use of advanced mathematics in postgraduate entrance examination] advanced mathematics Chapter 1 thinking map in basic stage
![Pit of kotlin bit operation (bytes[i] and 0xff error)](/img/2c/de0608c29d8af558f6f8dab4eb7fd8.png)
Pit of kotlin bit operation (bytes[i] and 0xff error)

freeswitch拨打分机号

async 与 await

HCM Beginner (II) - information type

虚幻 简单的屏幕雨滴后处理效果
随机推荐
Functions of switch configuration software
Pit of kotlin bit operation (bytes[i] and 0xff error)
[automatic operation and maintenance] what is the use of the automatic operation and maintenance platform
【ManageEngine卓豪 】助力世界顶尖音乐学院--茱莉亚学院,提升终端安全
FPGA - clocking -02- clock wiring resources of internal structure of 7 Series FPGA
JDBC database operation
Stack Title: parsing Boolean expressions
Servlet
做技术,自信不可或缺
JMM details
【ManageEngine卓豪】网络运维管理是什么,网络运维平台有什么用
Flink实战--多流合并
【ManageEngine卓豪】局域网监控的作用
交换机配置软件具有的作用
阶乘约数(唯一分解定理)
C语言课设学生选修课程系统(大作业)
【ManageEngine】如何实现网络自动化运维
【KV260】利用XADC生成芯片温度曲线图
10-golang运算符
Forkjoin and stream flow test