Betäubungs-Ring über dem Kopf (Gäste über Bit 18 der Rahmen-Flags), Nebel-Gitter LuneFogOverlay mit Shader Luneraria/FogOverlay aus LuneFog.Vision (10 Hz, weiche Kante), laufende Glyphe je Team als vier Zusatzwerte nach den Gebäude-Lebenspunkten. Reine Darstellung. Kern 627/627 (s4 8), EditMode 35/35, PlayMode 20/20, Verify 718/0, Selbsttest 30/30, Golden 0, Fingerabdruck unverändert. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
39 lines
1.4 KiB
Text
39 lines
1.4 KiB
Text
// S4 fog of war: a ground-hugging grid whose vertex alpha darkens what the viewer's team cannot see.
|
|
Shader "Luneraria/FogOverlay"
|
|
{
|
|
Properties
|
|
{
|
|
_Color("Fog colour", Color) = (0.03, 0.04, 0.07, 1)
|
|
}
|
|
SubShader
|
|
{
|
|
Tags { "RenderType" = "Transparent" "RenderPipeline" = "UniversalPipeline" "Queue" = "Transparent-50" }
|
|
Pass
|
|
{
|
|
Name "Fog"
|
|
Tags { "LightMode" = "UniversalForward" }
|
|
Blend SrcAlpha OneMinusSrcAlpha
|
|
ZWrite Off
|
|
ZTest LEqual
|
|
Cull Off
|
|
HLSLPROGRAM
|
|
#pragma vertex Vert
|
|
#pragma fragment Frag
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
|
CBUFFER_START(UnityPerMaterial)
|
|
half4 _Color;
|
|
CBUFFER_END
|
|
struct Attributes { float4 positionOS : POSITION; half4 color : COLOR; };
|
|
struct Varyings { float4 positionCS : SV_POSITION; half alpha : TEXCOORD0; };
|
|
Varyings Vert(Attributes input)
|
|
{
|
|
Varyings output;
|
|
output.positionCS = TransformObjectToHClip(input.positionOS.xyz);
|
|
output.alpha = input.color.a;
|
|
return output;
|
|
}
|
|
half4 Frag(Varyings input) : SV_Target { return half4(_Color.rgb, _Color.a * input.alpha); }
|
|
ENDHLSL
|
|
}
|
|
}
|
|
}
|