当前位置:网站首页>Shader Graph learns various special effects cases
Shader Graph learns various special effects cases
2022-08-10 02:12:00 【Wang Yuanjun】
文章目录
前言
打开unity的PackgeManager 安装ShaderGraph 和 UniversalRP ,If using the HD rendering pipeline 需要安装HighDefinitionRP, After all installed 通过菜单 Assets–Create --RenderingCreate a render pipeline configuration
注:如果没有Rendering 是因为没有安装UniversalRP
ShaderGraph基本介绍
All nodes are explained in detail
Then set up the render pipeline configuration file Editor - Project Setting - Graphics中的Scriptable Render Pipeline Settings
然后就可以创建ShaderGraph
Write your ownShader后 创建 一个材质球,然后把shader拖到材质球上,
Then you can use the shader,If the shader has no effect,Possibly your ownshader没有保存
案例
注:如果在MainPreview No effect on preview,请看一下 Are all parameters the same as in the screenshot,
Unity工程
外发光(2022.8.8)
主要节点:FresnelEffect,
原理:Fresnel Effect,菲涅耳效应,根据观察角度产生不同反射率从而对表面效果产生影响,当你靠近时,会反射更多的光.菲涅耳效应节点通过计算表面法线与视线方向的夹角来近似.这个角度越大,返回值越大.这种效果经常被用来实现边缘照明,这在很多艺术风格中都很常见
进阶 Outer glow with direction(2022.8.9)

裁剪(2022.8.9)
主要节点:Position 、AlphaClip
原理:AlphaClip的值如果比Alpha的值大,则会不显示
注意:一定要调PBR Master面板的Alpha参数,Otherwise, the effect will not be displayed
进阶 Cropped with edge color(2022.8.9)
进阶:在裁剪的基础上添加裁剪边缘光
首先利用Smoothstep做出一个边缘渐变
Smoothstep:如果输入In的值分别在输入Edge1和Edge2的值之间,则返回0和1之间的平滑Hermite插值的结果.如果输入In的值小于输入Step1的值,则返回0;如果大于输入Step2的值,则返回1

溶解(2022.8.9)
主要节点 SimpleNoise
注意:一定要调PBR Master面板的Alpha参数,Otherwise, the effect will not be displayed
进阶 Dissolves with edge color(2022.8.9)
溶解边缘添加发光,原理就是对Noise噪声做两个Step,然后相减,再乘个颜色,连到Emission发光节点上
cartoon shadow(2022.8.9)
主要节点NormalVector、DotProduct、SampleGradient
原理:使用Sample Gradient设置几个阴影色块颜色
水波纹(2022.8.9)
主要节点 TillingAndOffset 、Lerp
原理:通过Tilling And Offset节点的Offset来控制水纹的UV偏移,然后再使用Lerp将水纹和主贴图做一个线性差值
积雪效果(2022.8.9)
主要节点 NomalVector 、DotProduct
原理:使用一个向上的 Vector3和 模型的 Normal Vertor(法线向量) 点乘,得到的是 一个标量,表示模型法线向量和垂直向量的夹角(方向的相似度),然后通过 Step过滤得到要显示白色的部分,将要显示的 白色部分再和一个噪声相乘后输入到Master的Emission发光槽中.
不锈钢效果(2022.8.9)
主要节点 ViewDirection.、TillingAndOffset、SimpleNoise
原理:由View Direction视角移动, 引发Tilling And Offset 节点 移动 贴图,产生的效果.注意View Direction使用Tangent切线空间.该效果也可用于冰晶效果.
借鉴链接
https://blog.csdn.net/m0_46378049/article/details/115000628
https://blog.csdn.net/linxinfa/article/details/108049048
边栏推荐
- C language structure, function and pointer exercise (simple address book)
- DALL·E-2是如何工作的以及部署自己的DALL·E模型
- Fedora 36 dnf 安装ModSecurity和 OWASP 核心规则集
- 走出迷宫的最少步数2
- RedHat红帽RHEL7安装与使用,VMware Workstation16 Pro虚拟机的安装与使用
- 跳房子游戏
- 03|Process Control
- 彩色袜子题
- Xi'an biotin-tetrapolyethylene glycol-amide-4phenol light yellow semi-solid
- 数据的存储——C语言
猜你喜欢
随机推荐
【毕业设计】基于ESP32的在线墨水屏桌面摆件 -物联网 单片机 嵌入式
即时通讯开发如何撸一个WebSocket服务器
What do you know about FITC-labeled biotin (FITC-biotin|CAS: 134759-22-1)?
R语言使用glm函数构建逻辑回归模型(logistic)、使用subgroupAnalysis函数进行亚组分析并可视化森林图
有PEG-Biotin参与的(CAS:1778736-18-7)Biotin-PEG4-OH广泛用于分子靶点检测
地雷数量求解
由生物素参与的D-Biotinol,CAS号:53906-36-8具体特性说明
shell指定参数名传参
【CAS:41994-02-9 |Biotinyl tyramide】生物素基酪氨酰胺价格
MySQL最大连接数限制如何修改
Involved in PEG-Biotin (CAS: 1778736-18-7) Biotin-PEG4-OH is widely used in molecular target detection
PEG derivative Biotin-PEG1-OH (cas: 95611-10-2, 2-biotinaminoethanol) advantage description
微信公众号如何开通支付功能?
GB28181 sip和RTSP(Real-Time Streaming Protocol)实时流控制协议
How to turn off system protection in Win11?How to turn off the system protection restore function?
eyb:Redis学习(4)
egg.js中Class constructor BaseContextClass cannot be invoked without ‘new‘解决方法
你有对象类,我有结构体,Go lang1.18入门精炼教程,由白丁入鸿儒,go lang结构体(struct)的使用EP06
365 days challenge LeetCode1000 questions - Day 052 Step by step summation to get the minimum value of positive numbers Greedy
[obs] obsqsv11 hard coding and comparison with metartc codec









