当前位置:网站首页>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
边栏推荐
- egg.js中Class constructor BaseContextClass cannot be invoked without ‘new‘解决方法
- c语言指针练习题
- 这一次,话筒给你:向自由软件之父 Richard M. Stallman 提问啦!
- MySQL最大连接数限制如何修改
- Are the numbers entered symmetrical?
- 改变社交与工作状态的即时通讯是什么呢?
- Win11怎么关闭系统保护功能?系统保护还原功能怎么关闭?
- R语言使用cox函数构建生存分析回归模型、使用subgroupAnalysis进行亚组分析并可视化森林图
- 字符统计柱状图
- Summary of basic operations of c language files
猜你喜欢
【kali-密码攻击】(5.2.1)密码分析:Hash Identifier(哈希识别)
Docker interview question 2--get the number of database connections and docker-compose
【无标题】
How to add control panel to right click menu in win7
Web性能测试模型小结
嵌入式Qt-实现两个窗口的切换
Mysql database ALTER basic operations
Docker 面试题2则--取数据库连接数和docker-compose
【kali-密码攻击】(5.1.2)密码在线破解:Medusa
CAS:183896-00-6 (Biotin-PEG3-C3-NH2) PEG derivative
随机推荐
ABAP 里文件操作涉及到中文字符集的问题和解决方案
CAS:183896-00-6 (Biotin-PEG3-C3-NH2) PEG衍生物
Biotin-Cy2 Conjugate, Biotin-Cy2 Conjugate_Cy2 Biotin Conjugate
以太网PHY芯片LAN8720A芯片研究
[obs] obsqsv11 hard coding and comparison with metartc codec
将string类对象中的内容格式化到字符串Buffer中时遇到的异常崩溃分析
-采花生-
oracle的数据导入导出
彩色袜子题
2022金九银十工作潮,怎么样才能成功跳槽面试拿到高薪呢?
微信小程序tab切换时保存checkbox状态
Unity顶点动画
egg.js中Class constructor BaseContextClass cannot be invoked without ‘new‘解决方法
Prometeus 2.31.0 新特性
西安生物素-四聚乙二醇-酰胺-4苯酚 浅黄色半固态
Summary of basic operations of c language files
Characteristics of the (CAS:1527486-16-3TAMRA-azide-PEG3-Biotin) reaction in biotin azide!
-Chess game-
即时通讯开发如何撸一个WebSocket服务器
开发IM即时通讯容易吗?需要什么技术