Shader
unity工具人
林深时见鹿 海蓝时见鲸
展开
-
unity shader 单独给物体设置指定的反射贴图
//jave.lin 2019.06.17//simple illuminationShader "Custom/MyReflection"{ Properties{ [NoScaleOffset] _MainTex("Main Tex", 2D) = "white" {} [NoScaleOffset] _ReflectCube("Reflect Cube", Cube) = "white" {} _ReflectIntensity("Reflection Intensity", Ra转载 2022-01-26 15:15:29 · 500 阅读 · 0 评论 -
unity无锯齿遮罩shader
unity自带的mask组件很low,会有明显的锯齿感,而用shader可以在大多数情况下避免这种现象如下图,左侧为unity自带Mask的效果,右侧为shader效果,有一些细微的区别Shader "Custom/CircleMask" { Properties { _MainTex ("MainTex", 2D) = "white" {} _MaskTex ("MaskTex", 2D) = "white" {} [HideInInspect原创 2021-10-12 22:30:00 · 1385 阅读 · 0 评论 -
Unity-Shader-全息
//1. Transparent//2. Rim//3. Intersection HighlightShader "Kaima/Depth/ForceField"{ Properties { _MainColor("Main Color", Color) = (1,1,1,1) _RimPower("Rim Power", Range(0, 1)) = 1 _IntersectionPower("Intersect Power", Range(0, 1)) = 0 } SubS原创 2021-08-28 08:36:31 · 431 阅读 · 0 评论 -
Unity-Shader-接触边界发光
Shader "Kaima/Depth/IntersectionHighlight"{ Properties { _MainTex ("Texture", 2D) = "white" {} _IntersectionColor("Intersection Color", Color) = (1,1,0,0) _IntersectionWidth("Intersection Width", Range(0, 1)) = 0.1 } SubShader { Tags { "Rende原创 2021-08-22 23:34:17 · 527 阅读 · 0 评论 -
Unity-Shader-溶解
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'Shader "Kaima/Dissolve/BlendOriginColor"{ Properties { _MainTex ("Texture", 2D) = "white" {} _NoiseTex("Noise", 2D) = "white" {} _Threshold("Threshold", Range(0.0,原创 2021-08-22 23:33:34 · 501 阅读 · 0 评论 -
Shader-马赛克
001{ "m_SerializedProperties": [ { "typeInfo": { "fullName": "UnityEditor.ShaderGraph.Vector1ShaderProperty" }, "JSONnodeData": "{\n \"m_Name\": \"Offset\",\n \"m_GeneratePropertyBlock原创 2021-08-17 20:22:24 · 246 阅读 · 0 评论 -
unity毛玻璃效果(高斯模糊)
shader原理,读取屏幕像素进行处理,再返回纹理// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'Shader "my/FrostedGlass"{ Properties { _blurSizeXY("BlurSizeXY", Range(0,10)) = 2 } SubShader { // 透明队列,在原创 2021-04-05 20:57:05 · 4401 阅读 · 1 评论 -
unity使用球体和shader做全景球
Shader "Custom/InwardShader" { Properties { _MainTex ("Albedo (RGB)", 2D) = "white" {} } SubShader { Tags { "RenderType"="Opaque" } LOD 200 Cull Front CGPROGRAM #pragma surface surf Standard vertex:vert void vert(in原创 2020-09-25 22:32:55 · 2280 阅读 · 0 评论 -
Unity 球体+全景图=环境包围盒
如果只是单纯的要实现 一个贴图两面 显示,是不需要去编写shader的。 在Untiy中 创建一个 Material ,来到 Material 的Inspector面板下==> 最顶上 找到Shader 把Standard 切换成 Particles / Standard Surdace ==> 在Main Options 里 把Two Sided 打勾。...原创 2020-09-15 23:52:14 · 4542 阅读 · 2 评论 -
unity设置场景反射源
先准备一张全景图:链接:https://pan.baidu.com/s/1hjjViMihEZ9XyTNCsI9cqg提取码:8zcm全景图要先设置形状为cube打开Windows->Rendering->Lighting Setings界面反射源选择自定义选择准备好的全景贴图即可这样场景里的反射源就设置好啦...原创 2020-09-15 23:29:10 · 1485 阅读 · 0 评论