当前位置:网站首页>【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。
边栏推荐
- Restframework-simplejwt rewrite authentication mechanism
- PLA not pasted on the bed: 6 simple solutions
- UOW of dev XPO comparison
- 【KV260】利用XADC生成芯片温度曲线图
- Small guide for rapid completion of mechanical arm (VI): stepping motor driver
- High order binary search tree
- [postgraduate entrance examination advanced mathematics Wu Zhongxiang +880 version for personal use] advanced mathematics Chapter II Basic Stage mind map
- 自开发软件NoiseCreater1.1版本免费试用
- 子类调用父类的同名方法和属性
- freeswitch拨打分机号
猜你喜欢

Database problems, how to optimize Oracle SQL query statements faster and more efficient

HCM Beginner (I) - Introduction

To sort out the anomaly detection methods, just read this article!

Small guide for rapid completion of mechanical arm (VI): stepping motor driver

How does the port scanning tool help enterprises?

HCM Beginner (IV) - time

HCM Beginner (II) - information type

ArcServer密码重置(账号不可以重置)

让厦门灌口镇田头村变甜头村的特色农产品之一是蚂蚁新村

IT服务管理(ITSM)在高等教育领域的应用
随机推荐
Movable mechanical wall clock
Forkjoin and stream flow test
Minio error correction code, construction and startup of distributed Minio cluster
MySQL中 in 和 exists 的区别
Using Baidu map to query national subway lines
UOW of dev XPO comparison
Make Tiantou village sweet. Is Xianjing taro or cabbage the characteristic agricultural product of Tiantou Village
相同区域 多源栅格数据 各个像元行列号一致,即行数列数相同,像元大小相同
69 cesium code datasource loading geojson
Linux closes the redis process SYSTEMd+
json模块
Tidb database characteristics summary
Flink实战--多流合并
Freeswitch dial the extension number
阶乘约数(唯一分解定理)
Kubedm builds kubenetes cluster (Personal Learning version)
Transformer le village de tiantou en un village de betteraves sucrières
交换机配置软件具有的作用
[summary of problem thinking] Why is the register reset performed in user mode?
做技术,自信不可或缺