当前位置:网站首页>【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。
边栏推荐
- DHT11 温湿度传感器
- Elements of database ER diagram
- How does the port scanning tool help enterprises?
- 交换机配置软件具有的作用
- 【自动化运维】自动化运维平台有什么用
- FPGA - 7 Series FPGA internal structure clocking-01-clock Architecture Overview
- Database problems, how to optimize Oracle SQL query statements faster and more efficient
- 图片服务器项目测试
- 子类调用父类的同名方法和属性
- 手把手教你实现一个深度学习框架...
猜你喜欢

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

SQL语句

How did ManageEngine Zhuohao achieve the goal of being selected into Gartner Magic Quadrant for four consecutive years?

On siem

SystemVerilog learning-10-validation quantification and coverage

Understanding of C manualresetevent class

Ant new village is one of the special agricultural products that make Tiantou village in Guankou Town, Xiamen become Tiantou village

SystemVerilog learning-08-random constraints and thread control

68 cesium code datasource loading czml

【自动化运维】自动化运维平台有什么用
随机推荐
To sort out the anomaly detection methods, just read this article!
Record currency in MySQL
kubeadm搭建kubenetes 集群(个人学习版)
[leetcode] day91- duplicate elements exist
Recueillir des trésors dans le palais souterrain (recherche de mémoire profonde)
让厦门灌口镇田头村变“甜头”村的特色农产品之一是
ForkJoin和Stream流测试
交换机配置软件具有的作用
浏览器端保存数据到本地文件
SystemVerilog learning-08-random constraints and thread control
PLA not pasted on the bed: 6 simple solutions
[summary of knowledge points] chi square distribution, t distribution, F distribution
Forkjoin and stream flow test
B-树系列
Flink实战--多流合并
Self confidence is indispensable for technology
HDU - 1501 zipper (memory deep search)
sql中TCL语句(事务控制语句)
阿里OSS Postman Invalid according to Policy: Policy Condition failed: [“starts-with“, “$key“, “test/“]
Functions of switch configuration software