Files
FueraDeEscala/Assets/Game Kit Controller/Shaders/Glow Shader.shader
Robii Aragon 0777676dbd Update Game Kit Controller assets
Bulk modifications across the Game Kit Controller package: updated materials and shader, adjusted particle prefabs, and numerous prefab updates for Character Customization, Inventory, Map System, Locked Camera System, Probuilder export objects, Gravity, Health, Mission System and other scene elements. These changes appear to be a large asset rework/reimport or parameter/reference updates to keep prefabs and materials in sync.
2026-03-27 23:57:08 -07:00

62 lines
1.8 KiB
Plaintext

Shader "Custom/Glow Shader" {
Properties {
_Color ("Color", Color) = (1,1,1,1)
_Size ("Atmosphere Size Multiplier", Range(0,16)) = 4
_Rim ("Fade Power", Range(0,8)) = 4
_Light ("Lighting Power", Range(0,10)) = 1.4
_Ambient ("Ambient Power", Range (0,6)) = 0.8
}
SubShader {
Tags { "RenderType"="Transparent" }
LOD 200
Cull Front
CGPROGRAM
// Physically based Standard lighting model, and enable shadows on all light types
#pragma surface surf NegativeLambert fullforwardshadows alpha:fade
#pragma vertex vert
// Use shader model 3.0 target, to get nicer looking lighting
#pragma target 3.0
struct Input {
float3 viewDir;
};
half _Size;
half _Rim;
half _Light;
half _Ambient;
fixed4 _Color;
void vert (inout appdata_full v) {
v.vertex.xyz += v.vertex.xyz * _Size / 10;
v.normal *= -1;
}
half4 LightingNegativeLambert (SurfaceOutput s, half3 lightDir, half3 viewDir, half atten) {
s.Normal = normalize (s.Normal);
half diff = max (0, dot (-s.Normal, lightDir)) * _Light + _Ambient;
half4 c;
c.rgb = (s.Albedo * _LightColor0 * diff) * atten;
c.a = s.Alpha;
return c;
}
void surf (Input IN, inout SurfaceOutput o) {
half rim = saturate (dot (normalize (IN.viewDir), o.Normal));
// Albedo comes from a texture tinted by color
fixed4 c = _Color;
o.Albedo = c.rgb;
o.Alpha = lerp (0, 1, pow (rim, _Rim));
}
ENDCG
}
FallBack "Diffuse"
}