Restructured for new direction.
This commit is contained in:
BIN
Assets/Shaders/.DS_Store
vendored
Normal file
BIN
Assets/Shaders/.DS_Store
vendored
Normal file
Binary file not shown.
8
Assets/Shaders/UIDissolveBlueParticles.meta
Normal file
8
Assets/Shaders/UIDissolveBlueParticles.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb46d99726ba04b0994fbf860e5c3b4f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,191 @@
|
||||
Shader "BriarQueen/UI/Dissolve Blue Particles"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1, 1, 1, 1)
|
||||
|
||||
_DissolveAmount ("Dissolve Amount", Range(0, 1)) = 0
|
||||
_EdgeWidth ("Edge Width", Range(0.001, 0.25)) = 0.06
|
||||
_ParticleColor ("Particle Color", Color) = (0.15, 0.65, 1, 1)
|
||||
_ParticleIntensity ("Particle Intensity", Range(0, 8)) = 2.5
|
||||
_ParticleDensity ("Particle Density", Range(0, 1)) = 0.82
|
||||
_ParticleScale ("Particle Scale", Range(10, 250)) = 95
|
||||
_ParticleDrift ("Particle Drift", Range(0, 3)) = 0.65
|
||||
|
||||
_NoiseScale ("Noise Scale", Range(1, 80)) = 24
|
||||
_NoiseStrength ("Noise Strength", Range(0, 1)) = 0.55
|
||||
[Toggle] _ReverseDirection ("Reverse Direction", Float) = 0
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue" = "Transparent"
|
||||
"IgnoreProjector" = "True"
|
||||
"RenderType" = "Transparent"
|
||||
"PreviewType" = "Plane"
|
||||
"CanUseSpriteAtlas" = "True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex Vert
|
||||
#pragma fragment Frag
|
||||
#pragma target 2.0
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
||||
|
||||
struct AppData
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
|
||||
float _DissolveAmount;
|
||||
float _EdgeWidth;
|
||||
fixed4 _ParticleColor;
|
||||
float _ParticleIntensity;
|
||||
float _ParticleDensity;
|
||||
float _ParticleScale;
|
||||
float _ParticleDrift;
|
||||
float _NoiseScale;
|
||||
float _NoiseStrength;
|
||||
float _ReverseDirection;
|
||||
|
||||
float Hash21(float2 p)
|
||||
{
|
||||
p = frac(p * float2(123.34, 345.45));
|
||||
p += dot(p, p + 34.345);
|
||||
return frac(p.x * p.y);
|
||||
}
|
||||
|
||||
float ValueNoise(float2 uv)
|
||||
{
|
||||
float2 i = floor(uv);
|
||||
float2 f = frac(uv);
|
||||
float2 u = f * f * (3.0 - 2.0 * f);
|
||||
|
||||
float a = Hash21(i);
|
||||
float b = Hash21(i + float2(1.0, 0.0));
|
||||
float c = Hash21(i + float2(0.0, 1.0));
|
||||
float d = Hash21(i + float2(1.0, 1.0));
|
||||
|
||||
return lerp(lerp(a, b, u.x), lerp(c, d, u.x), u.y);
|
||||
}
|
||||
|
||||
float DissolveNoise(float2 uv)
|
||||
{
|
||||
float n = ValueNoise(uv * _NoiseScale);
|
||||
n += ValueNoise(uv * _NoiseScale * 2.13 + 17.0) * 0.5;
|
||||
n += ValueNoise(uv * _NoiseScale * 4.07 + 43.0) * 0.25;
|
||||
n /= 1.75;
|
||||
|
||||
float verticalBias = lerp(uv.y, 1.0 - uv.y, step(0.5, _ReverseDirection));
|
||||
return saturate(lerp(verticalBias, n, _NoiseStrength));
|
||||
}
|
||||
|
||||
Varyings Vert(AppData input)
|
||||
{
|
||||
Varyings output;
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
||||
|
||||
output.worldPosition = input.vertex;
|
||||
output.vertex = UnityObjectToClipPos(input.vertex);
|
||||
output.uv = input.texcoord;
|
||||
output.color = input.color * _Color;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
fixed4 Frag(Varyings input) : SV_Target
|
||||
{
|
||||
fixed4 color = (tex2D(_MainTex, input.uv) + _TextureSampleAdd) * input.color;
|
||||
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
color.a *= UnityGet2DClipping(input.worldPosition.xy, _ClipRect);
|
||||
#endif
|
||||
|
||||
float amount = saturate(_DissolveAmount);
|
||||
float dissolveNoise = DissolveNoise(input.uv);
|
||||
float visible = smoothstep(amount - _EdgeWidth, amount + _EdgeWidth, dissolveNoise);
|
||||
visible = amount <= 0.001 ? 1.0 : visible;
|
||||
visible = amount >= 0.999 ? 0.0 : visible;
|
||||
|
||||
float edge = 1.0 - smoothstep(0.0, _EdgeWidth, abs(dissolveNoise - amount));
|
||||
edge *= step(0.001, amount) * step(amount, 0.999);
|
||||
|
||||
float2 particleUv = input.uv * _ParticleScale;
|
||||
particleUv.y += _Time.y * _ParticleDrift;
|
||||
particleUv.x += sin(_Time.y + input.uv.y * 12.0) * 0.35;
|
||||
|
||||
float particles = step(_ParticleDensity, Hash21(floor(particleUv)));
|
||||
particles *= edge;
|
||||
particles *= visible;
|
||||
|
||||
color.rgb += _ParticleColor.rgb * particles * _ParticleIntensity;
|
||||
color.rgb = lerp(color.rgb, _ParticleColor.rgb, edge * 0.35);
|
||||
color.a *= visible;
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip(color.a - 0.001);
|
||||
#endif
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 98d400ffbee96448c81be507133944e6
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Shaders/UIEdgeDarken.meta
Normal file
8
Assets/Shaders/UIEdgeDarken.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cbf657221f9546d789751652d87d4bb6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
142
Assets/Shaders/UIEdgeDarken/UIEdgeDarken.shader
Normal file
142
Assets/Shaders/UIEdgeDarken/UIEdgeDarken.shader
Normal file
@@ -0,0 +1,142 @@
|
||||
Shader "BriarQueen/UI/Edge Darken"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (0, 0, 0, 0.65)
|
||||
|
||||
_Amount ("Amount", Range(0, 1)) = 1
|
||||
_EdgeDarkness ("Edge Darkness", Range(0, 1)) = 1
|
||||
_CenterDarkness ("Center Darkness", Range(0, 1)) = 0
|
||||
_EdgeWidth ("Edge Width", Range(0.001, 0.5)) = 0.22
|
||||
_Softness ("Softness", Range(0.001, 0.5)) = 0.18
|
||||
[HideInInspector] _RectSize ("Rect Size", Vector) = (1, 1, 0, 0)
|
||||
[HideInInspector] _RectPivot ("Rect Pivot", Vector) = (0.5, 0.5, 0, 0)
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue" = "Transparent"
|
||||
"IgnoreProjector" = "True"
|
||||
"RenderType" = "Transparent"
|
||||
"PreviewType" = "Plane"
|
||||
"CanUseSpriteAtlas" = "True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex Vert
|
||||
#pragma fragment Frag
|
||||
#pragma target 2.0
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
||||
|
||||
struct AppData
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 uv : TEXCOORD0;
|
||||
float2 localPosition : TEXCOORD1;
|
||||
float4 worldPosition : TEXCOORD2;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
|
||||
float _Amount;
|
||||
float _EdgeDarkness;
|
||||
float _CenterDarkness;
|
||||
float _EdgeWidth;
|
||||
float _Softness;
|
||||
float4 _RectSize;
|
||||
float4 _RectPivot;
|
||||
|
||||
Varyings Vert(AppData input)
|
||||
{
|
||||
Varyings output;
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
||||
|
||||
output.worldPosition = input.vertex;
|
||||
output.vertex = UnityObjectToClipPos(input.vertex);
|
||||
output.uv = input.texcoord;
|
||||
output.localPosition = input.vertex.xy;
|
||||
output.color = input.color * _Color;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
fixed4 Frag(Varyings input) : SV_Target
|
||||
{
|
||||
fixed4 color = (tex2D(_MainTex, input.uv) + _TextureSampleAdd) * input.color;
|
||||
|
||||
float2 safeRectSize = max(_RectSize.xy, float2(0.0001, 0.0001));
|
||||
float2 rectUv = saturate((input.localPosition / safeRectSize) + _RectPivot.xy);
|
||||
float edgeDistance = min(
|
||||
min(rectUv.x, 1.0 - rectUv.x),
|
||||
min(rectUv.y, 1.0 - rectUv.y));
|
||||
float outerEdge = 1.0 - smoothstep(_EdgeWidth, _EdgeWidth + _Softness, edgeDistance);
|
||||
float darkness = lerp(_CenterDarkness, _EdgeDarkness, outerEdge);
|
||||
|
||||
color.a *= saturate(_Amount) * darkness;
|
||||
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
color.a *= UnityGet2DClipping(input.worldPosition.xy, _ClipRect);
|
||||
#endif
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip(color.a - 0.001);
|
||||
#endif
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
9
Assets/Shaders/UIEdgeDarken/UIEdgeDarken.shader.meta
Normal file
9
Assets/Shaders/UIEdgeDarken/UIEdgeDarken.shader.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e6f7e1014c7f40e29d8d76fedf25aa83
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
3
Assets/Shaders/UIFogReveal.meta
Normal file
3
Assets/Shaders/UIFogReveal.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6c58432b4ecf4cce8e43e4d7957b4080
|
||||
timeCreated: 1778334643
|
||||
222
Assets/Shaders/UIFogReveal/UIFogReveal.shader
Normal file
222
Assets/Shaders/UIFogReveal/UIFogReveal.shader
Normal file
@@ -0,0 +1,222 @@
|
||||
Shader "BriarQueen/UI/Fog Reveal Haar"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1, 1, 1, 1)
|
||||
|
||||
_FogAmount ("Fog Amount", Range(0, 1)) = 0
|
||||
_FogColor ("Fog Color", Color) = (0.18, 0.20, 0.26, 1)
|
||||
_FogIntensity ("Fog Intensity", Range(0, 1)) = 0.95
|
||||
_EdgeSoftness ("Edge Softness", Range(0.05, 1.0)) = 0.55
|
||||
_NoiseScale ("Noise Scale", Range(1, 20)) = 5
|
||||
_DriftSpeed ("Drift Speed", Range(0, 0.5)) = 0.04
|
||||
_DensityVariation ("Density Variation", Range(0, 1)) = 0.28
|
||||
_AspectRatio ("Aspect Ratio", Float) = 1.777
|
||||
[Toggle] _FogMotion ("Fog Motion", Float) = 1
|
||||
[Toggle] _UseSprite ("Use Sprite", Float) = 0
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue" = "Transparent"
|
||||
"IgnoreProjector" = "True"
|
||||
"RenderType" = "Transparent"
|
||||
"PreviewType" = "Plane"
|
||||
"CanUseSpriteAtlas" = "True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
CGPROGRAM
|
||||
#pragma vertex Vert
|
||||
#pragma fragment Frag
|
||||
#pragma target 3.0
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
||||
|
||||
struct AppData
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
|
||||
fixed4 _FogColor;
|
||||
float _FogAmount;
|
||||
float _FogIntensity;
|
||||
float _EdgeSoftness;
|
||||
float _NoiseScale;
|
||||
float _DriftSpeed;
|
||||
float _DensityVariation;
|
||||
float _AspectRatio;
|
||||
float _FogMotion;
|
||||
float _UseSprite;
|
||||
|
||||
// ── Noise ─────────────────────────────────────────────────
|
||||
|
||||
float2 Hash22(float2 p)
|
||||
{
|
||||
p = float2(dot(p, float2(127.1, 311.7)),
|
||||
dot(p, float2(269.5, 183.3)));
|
||||
return -1.0 + 2.0 * frac(sin(p) * 43758.5453);
|
||||
}
|
||||
|
||||
float GradientNoise(float2 uv)
|
||||
{
|
||||
float2 i = floor(uv);
|
||||
float2 f = frac(uv);
|
||||
float2 u = f * f * f * (f * (f * 6.0 - 15.0) + 10.0);
|
||||
|
||||
return lerp(
|
||||
lerp(dot(Hash22(i + float2(0, 0)), f - float2(0, 0)),
|
||||
dot(Hash22(i + float2(1, 0)), f - float2(1, 0)), u.x),
|
||||
lerp(dot(Hash22(i + float2(0, 1)), f - float2(0, 1)),
|
||||
dot(Hash22(i + float2(1, 1)), f - float2(1, 1)), u.x),
|
||||
u.y);
|
||||
}
|
||||
|
||||
float HaarFBM(float2 uv, float2 drift)
|
||||
{
|
||||
float2 p = uv * _NoiseScale;
|
||||
|
||||
float2 uvA = p + drift;
|
||||
float n = GradientNoise(uvA) * 0.500;
|
||||
n += GradientNoise(uvA * 2.01 + 3.7) * 0.250;
|
||||
n += GradientNoise(uvA * 4.03 + 7.3) * 0.125;
|
||||
n += GradientNoise(uvA * 8.07 + 1.9) * 0.063;
|
||||
|
||||
float2 uvB = p + drift * float2(0.7, -0.4) + float2(17.3, 5.8);
|
||||
float m = GradientNoise(uvB) * 0.500;
|
||||
m += GradientNoise(uvB * 2.05 + 9.1) * 0.250;
|
||||
m += GradientNoise(uvB * 4.11 + 2.6) * 0.125;
|
||||
|
||||
float combined = lerp(n, m, 0.4);
|
||||
return saturate(combined * 0.5 + 0.5);
|
||||
}
|
||||
|
||||
// ── Vertex ────────────────────────────────────────────────
|
||||
|
||||
Varyings Vert(AppData input)
|
||||
{
|
||||
Varyings output;
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
||||
|
||||
output.worldPosition = input.vertex;
|
||||
output.vertex = UnityObjectToClipPos(input.vertex);
|
||||
output.uv = input.texcoord;
|
||||
output.color = input.color * _Color;
|
||||
return output;
|
||||
}
|
||||
|
||||
// ── Fragment ──────────────────────────────────────────────
|
||||
|
||||
fixed4 Frag(Varyings input) : SV_Target
|
||||
{
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
float clipAlpha = UnityGet2DClipping(input.worldPosition.xy, _ClipRect);
|
||||
#else
|
||||
float clipAlpha = 1.0;
|
||||
#endif
|
||||
|
||||
fixed4 texColor = (tex2D(_MainTex, input.uv) + _TextureSampleAdd) * input.color;
|
||||
|
||||
float2 centredUv = input.uv - 0.5;
|
||||
centredUv.x *= _AspectRatio;
|
||||
float dist = length(centredUv) * 2.0;
|
||||
|
||||
float2 drift = _FogMotion > 0.5
|
||||
? float2(_Time.y * _DriftSpeed, _Time.y * _DriftSpeed * 0.3)
|
||||
: float2(0.0, 0.0);
|
||||
|
||||
float fogNoise = HaarFBM(input.uv, drift);
|
||||
|
||||
float noiseBias = (fogNoise - 0.5) * _EdgeSoftness * 2.5;
|
||||
float softEdge = _EdgeSoftness * 0.8;
|
||||
|
||||
float threshold = lerp(-_EdgeSoftness * 2.0, 2.5, _FogAmount);
|
||||
|
||||
float fogMask = 1.0 - smoothstep(
|
||||
threshold - softEdge + noiseBias,
|
||||
threshold + softEdge + noiseBias,
|
||||
dist
|
||||
);
|
||||
fogMask = saturate(fogMask);
|
||||
|
||||
fixed4 result;
|
||||
|
||||
if (_UseSprite > 0.5)
|
||||
{
|
||||
// Sprite mode — fog mask directly gates the sprite's alpha
|
||||
// Pixels outside the fog are fully transparent
|
||||
// Pixels inside the fog draw the sprite normally
|
||||
// The fog edge produces a soft natural reveal with noise
|
||||
result.rgb = texColor.rgb;
|
||||
result.a = texColor.a * fogMask * clipAlpha;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Transparent mode — purely procedural fog colour
|
||||
float density = 1.0 - fogNoise * _DensityVariation;
|
||||
result.rgb = _FogColor.rgb * density;
|
||||
result.a = fogMask * _FogIntensity * clipAlpha;
|
||||
}
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip(result.a - 0.001);
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Shaders/UIFogReveal/UIFogReveal.shader.meta
Normal file
3
Assets/Shaders/UIFogReveal/UIFogReveal.shader.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4c06bff5163042e7b6e2dfbe2890108d
|
||||
timeCreated: 1778334643
|
||||
8
Assets/Shaders/UILightGlow.meta
Normal file
8
Assets/Shaders/UILightGlow.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dd50cde45f7846fab3a7a9d78083aa0d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
149
Assets/Shaders/UILightGlow/UILightGlow.shader
Normal file
149
Assets/Shaders/UILightGlow/UILightGlow.shader
Normal file
@@ -0,0 +1,149 @@
|
||||
Shader "BriarQueen/UI/Light Glow"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1, 1, 1, 1)
|
||||
|
||||
_LightColor ("Light Color", Color) = (1, 0.78, 0.35, 1)
|
||||
_Intensity ("Intensity", Range(0, 8)) = 1.5
|
||||
_Radius ("Radius", Range(0, 1)) = 0.35
|
||||
_Falloff ("Falloff", Range(0.001, 1)) = 0.35
|
||||
_Softness ("Softness", Range(0.25, 6)) = 1.6
|
||||
_Center ("Center", Vector) = (0.5, 0.5, 0, 0)
|
||||
|
||||
_FlickerStrength ("Flicker Strength", Range(0, 1)) = 0.08
|
||||
_FlickerSpeed ("Flicker Speed", Range(0, 20)) = 6
|
||||
_FlickerOffset ("Flicker Offset", Float) = 0
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue" = "Transparent"
|
||||
"IgnoreProjector" = "True"
|
||||
"RenderType" = "Transparent"
|
||||
"PreviewType" = "Plane"
|
||||
"CanUseSpriteAtlas" = "True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend SrcAlpha One
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex Vert
|
||||
#pragma fragment Frag
|
||||
#pragma target 2.0
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
||||
|
||||
struct AppData
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
|
||||
fixed4 _LightColor;
|
||||
float _Intensity;
|
||||
float _Radius;
|
||||
float _Falloff;
|
||||
float _Softness;
|
||||
float4 _Center;
|
||||
float _FlickerStrength;
|
||||
float _FlickerSpeed;
|
||||
float _FlickerOffset;
|
||||
|
||||
Varyings Vert(AppData input)
|
||||
{
|
||||
Varyings output;
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
||||
|
||||
output.worldPosition = input.vertex;
|
||||
output.vertex = UnityObjectToClipPos(input.vertex);
|
||||
output.uv = input.texcoord;
|
||||
output.color = input.color * _Color;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
fixed4 Frag(Varyings input) : SV_Target
|
||||
{
|
||||
fixed4 sprite = tex2D(_MainTex, input.uv) + _TextureSampleAdd;
|
||||
|
||||
float dist = distance(input.uv, _Center.xy);
|
||||
float glow = 1.0 - smoothstep(_Radius, _Radius + _Falloff, dist);
|
||||
glow = pow(saturate(glow), _Softness);
|
||||
|
||||
float flickerA = sin((_Time.y + _FlickerOffset) * _FlickerSpeed);
|
||||
float flickerB = sin((_Time.y + _FlickerOffset) * _FlickerSpeed * 2.37 + 1.91);
|
||||
float flicker = 1.0 + ((flickerA * 0.65 + flickerB * 0.35) * _FlickerStrength);
|
||||
|
||||
float alpha = glow * sprite.a * input.color.a * _LightColor.a * saturate(flicker);
|
||||
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
alpha *= UnityGet2DClipping(input.worldPosition.xy, _ClipRect);
|
||||
#endif
|
||||
|
||||
fixed4 color;
|
||||
color.rgb = _LightColor.rgb * _Intensity;
|
||||
color.a = alpha;
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip(color.a - 0.001);
|
||||
#endif
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
9
Assets/Shaders/UILightGlow/UILightGlow.shader.meta
Normal file
9
Assets/Shaders/UILightGlow/UILightGlow.shader.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 37ffbc5d812345a3b233ed6d6929fbf5
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Shaders/UIMenuSelectionBrush.meta
Normal file
8
Assets/Shaders/UIMenuSelectionBrush.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a83e7c5f3d4b46868b339c5f1aa92e34
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
170
Assets/Shaders/UIMenuSelectionBrush/UIMenuSelectionBrush.shader
Normal file
170
Assets/Shaders/UIMenuSelectionBrush/UIMenuSelectionBrush.shader
Normal file
@@ -0,0 +1,170 @@
|
||||
Shader "BriarQueen/UI/Menu Selection Brush"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (0.02, 0.018, 0.015, 0.86)
|
||||
|
||||
_Reveal ("Reveal", Range(0, 1)) = 1
|
||||
_RevealSoftness ("Reveal Softness", Range(0.001, 0.35)) = 0.08
|
||||
_EdgeFade ("Edge Fade", Range(0.001, 0.35)) = 0.12
|
||||
_EndFade ("End Fade", Range(0.001, 0.35)) = 0.08
|
||||
_NoiseStrength ("Noise Strength", Range(0, 1)) = 0.18
|
||||
_NoiseScale ("Noise Scale", Range(1, 80)) = 24
|
||||
_StreakStrength ("Streak Strength", Range(0, 1)) = 0.22
|
||||
_StreakScale ("Streak Scale", Range(1, 80)) = 18
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue" = "Transparent"
|
||||
"IgnoreProjector" = "True"
|
||||
"RenderType" = "Transparent"
|
||||
"PreviewType" = "Plane"
|
||||
"CanUseSpriteAtlas" = "True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
|
||||
CGPROGRAM
|
||||
#pragma vertex Vert
|
||||
#pragma fragment Frag
|
||||
#pragma target 2.0
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
||||
|
||||
struct AppData
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
|
||||
float _Reveal;
|
||||
float _RevealSoftness;
|
||||
float _EdgeFade;
|
||||
float _EndFade;
|
||||
float _NoiseStrength;
|
||||
float _NoiseScale;
|
||||
float _StreakStrength;
|
||||
float _StreakScale;
|
||||
|
||||
float Hash21(float2 p)
|
||||
{
|
||||
p = frac(p * float2(123.34, 345.45));
|
||||
p += dot(p, p + 34.345);
|
||||
return frac(p.x * p.y);
|
||||
}
|
||||
|
||||
float ValueNoise(float2 uv)
|
||||
{
|
||||
float2 i = floor(uv);
|
||||
float2 f = frac(uv);
|
||||
float2 u = f * f * (3.0 - 2.0 * f);
|
||||
|
||||
float a = Hash21(i);
|
||||
float b = Hash21(i + float2(1.0, 0.0));
|
||||
float c = Hash21(i + float2(0.0, 1.0));
|
||||
float d = Hash21(i + float2(1.0, 1.0));
|
||||
|
||||
return lerp(lerp(a, b, u.x), lerp(c, d, u.x), u.y);
|
||||
}
|
||||
|
||||
Varyings Vert(AppData input)
|
||||
{
|
||||
Varyings output;
|
||||
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
||||
|
||||
output.worldPosition = input.vertex;
|
||||
output.vertex = UnityObjectToClipPos(input.vertex);
|
||||
output.uv = input.texcoord;
|
||||
output.color = input.color * _Color;
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
fixed4 Frag(Varyings input) : SV_Target
|
||||
{
|
||||
fixed4 color = (tex2D(_MainTex, input.uv) + _TextureSampleAdd) * input.color;
|
||||
|
||||
float reveal = saturate(_Reveal);
|
||||
float halfWidth = reveal * 0.5;
|
||||
float distFromCenter = abs(input.uv.x - 0.5);
|
||||
float revealMask = 1.0 - smoothstep(halfWidth, halfWidth + _RevealSoftness, distFromCenter);
|
||||
revealMask *= smoothstep(0.0, 0.02, reveal);
|
||||
|
||||
float verticalFade = smoothstep(0.0, _EdgeFade, input.uv.y)
|
||||
* (1.0 - smoothstep(1.0 - _EdgeFade, 1.0, input.uv.y));
|
||||
float endFade = smoothstep(0.0, _EndFade, input.uv.x)
|
||||
* (1.0 - smoothstep(1.0 - _EndFade, 1.0, input.uv.x));
|
||||
|
||||
float noise = ValueNoise(input.uv * _NoiseScale);
|
||||
float streak = ValueNoise(float2(input.uv.x * _StreakScale, input.uv.y * 3.0));
|
||||
float surface = 1.0 - (noise * _NoiseStrength) - (streak * _StreakStrength);
|
||||
|
||||
color.a *= revealMask * verticalFade * endFade * saturate(surface);
|
||||
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
color.a *= UnityGet2DClipping(input.worldPosition.xy, _ClipRect);
|
||||
#endif
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip(color.a - 0.001);
|
||||
#endif
|
||||
|
||||
return color;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d1534a024e2149c4a83bfc43e7e3f6d2
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
3
Assets/Shaders/UIRowReveal.meta
Normal file
3
Assets/Shaders/UIRowReveal.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5650ab1c221146bea0b3f89f10812aba
|
||||
timeCreated: 1778339007
|
||||
143
Assets/Shaders/UIRowReveal/UIRowReveal.shader
Normal file
143
Assets/Shaders/UIRowReveal/UIRowReveal.shader
Normal file
@@ -0,0 +1,143 @@
|
||||
Shader "BriarQueen/UI/Row Highlight"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
|
||||
_Color ("Tint", Color) = (1, 1, 1, 1)
|
||||
|
||||
_HighlightColor ("Highlight Color", Color) = (0, 0, 0, 1)
|
||||
_Intensity ("Intensity", Range(0, 1)) = 0.6
|
||||
_HorizontalWidth ("Horizontal Width", Range(0.1, 1)) = 0.7
|
||||
_VerticalWidth ("Vertical Width", Range(0.1, 1)) = 0.7
|
||||
_CentreDarkness ("Centre Darkness", Range(1, 4)) = 2.0
|
||||
|
||||
_StencilComp ("Stencil Comparison", Float) = 8
|
||||
_Stencil ("Stencil ID", Float) = 0
|
||||
_StencilOp ("Stencil Operation", Float) = 0
|
||||
_StencilWriteMask ("Stencil Write Mask", Float) = 255
|
||||
_StencilReadMask ("Stencil Read Mask", Float) = 255
|
||||
_ColorMask ("Color Mask", Float) = 15
|
||||
|
||||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue" = "Transparent"
|
||||
"IgnoreProjector" = "True"
|
||||
"RenderType" = "Transparent"
|
||||
"PreviewType" = "Plane"
|
||||
"CanUseSpriteAtlas" = "True"
|
||||
}
|
||||
|
||||
Stencil
|
||||
{
|
||||
Ref [_Stencil]
|
||||
Comp [_StencilComp]
|
||||
Pass [_StencilOp]
|
||||
ReadMask [_StencilReadMask]
|
||||
WriteMask [_StencilWriteMask]
|
||||
}
|
||||
|
||||
Cull Off
|
||||
Lighting Off
|
||||
ZWrite Off
|
||||
ZTest [unity_GUIZTestMode]
|
||||
Blend SrcAlpha OneMinusSrcAlpha
|
||||
ColorMask [_ColorMask]
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Default"
|
||||
CGPROGRAM
|
||||
#pragma vertex Vert
|
||||
#pragma fragment Frag
|
||||
#pragma target 2.0
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "UnityUI.cginc"
|
||||
|
||||
#pragma multi_compile_local _ UNITY_UI_CLIP_RECT
|
||||
#pragma multi_compile_local _ UNITY_UI_ALPHACLIP
|
||||
|
||||
struct AppData
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 color : COLOR;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
fixed4 color : COLOR;
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 worldPosition : TEXCOORD1;
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
sampler2D _MainTex;
|
||||
fixed4 _Color;
|
||||
fixed4 _TextureSampleAdd;
|
||||
float4 _ClipRect;
|
||||
|
||||
fixed4 _HighlightColor;
|
||||
float _Intensity;
|
||||
float _HorizontalWidth;
|
||||
float _VerticalWidth;
|
||||
float _CentreDarkness;
|
||||
|
||||
Varyings Vert(AppData input)
|
||||
{
|
||||
Varyings output;
|
||||
UNITY_SETUP_INSTANCE_ID(input);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
||||
|
||||
output.worldPosition = input.vertex;
|
||||
output.vertex = UnityObjectToClipPos(input.vertex);
|
||||
output.uv = input.texcoord;
|
||||
output.color = input.color * _Color;
|
||||
return output;
|
||||
}
|
||||
|
||||
fixed4 Frag(Varyings input) : SV_Target
|
||||
{
|
||||
#ifdef UNITY_UI_CLIP_RECT
|
||||
float clipAlpha = UnityGet2DClipping(input.worldPosition.xy, _ClipRect);
|
||||
#else
|
||||
float clipAlpha = 1.0;
|
||||
#endif
|
||||
|
||||
float2 uv = input.uv * 2.0 - 1.0;
|
||||
|
||||
// smoothstep reaches exactly 0 at _Width — no rect boundary visible
|
||||
float h = 1.0 - smoothstep(0.0, _HorizontalWidth, abs(uv.x));
|
||||
float v = 1.0 - smoothstep(0.0, _VerticalWidth, abs(uv.y));
|
||||
float mask = h * v;
|
||||
|
||||
// Darker in the centre, lighter toward the fade edge
|
||||
float radial = length(float2(abs(uv.x) / _HorizontalWidth,
|
||||
abs(uv.y) / _VerticalWidth));
|
||||
float centreBoost = pow(saturate(1.0 - radial), _CentreDarkness);
|
||||
float brightness = lerp(1.0, 0.25, centreBoost);
|
||||
|
||||
fixed4 result;
|
||||
result.rgb = _HighlightColor.rgb * brightness;
|
||||
|
||||
// Deliberately not multiplying by sprite or vertex alpha —
|
||||
// transparent image or color has no effect on the gradient
|
||||
result.a = mask * _Intensity * clipAlpha;
|
||||
|
||||
#ifdef UNITY_UI_ALPHACLIP
|
||||
clip(result.a - 0.001);
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
ENDCG
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Shaders/UIRowReveal/UIRowReveal.shader.meta
Normal file
3
Assets/Shaders/UIRowReveal/UIRowReveal.shader.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d33867d58e44b3c9e0ddeabc7c67ee3
|
||||
timeCreated: 1778339007
|
||||
Reference in New Issue
Block a user