CarmenSandiego/Assets/Shaders/ScreenUV.shader
Jamie Greunbaum 2bf76f34cd Oh, boy, there's a lot here.
- Added a functioning Modem.
- Added a destination sign at the Modem's destination location.
- Intro video transcripts are now optional in case files.
- Added a proper endgame handler for round 1.
- Fixed a lot of formatting for text between rounds.
- Fixed a bug that showed the wrong text if all round 3 markers are exhausted.
- Shortened time to detect improperly placed markers by just a bit.
2025-08-18 04:19:21 -04:00

61 lines
1.5 KiB
Plaintext

Shader "Custom/ScreenNoise"
{
Properties
{
_MainTex ("Image", 2D) = "white" {}
_Colour1 ("Colour 1", Color) = (0.0, 0.0, 0.0, 1.0)
_Colour2 ("Colour 2", Color) = (1.0, 1.0, 1.0, 1.0)
}
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 200
Pass {
Cull Off
CGPROGRAM
#include "UnityCG.cginc"
#pragma vertex vert
#pragma fragment frag
sampler2D _MainTex;
CBUFFER_START(UnityPerMaterial)
uniform float4 _Colour1;
uniform float4 _Colour2;
CBUFFER_END
struct Data
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
};
struct V2F
{
float4 position : SV_POSITION;
float4 screenPosition : TEXCOORD0;
};
V2F vert(Data v)
{
V2F o;
o.position = UnityObjectToClipPos(v.vertex);
o.screenPosition = ComputeScreenPos(o.position);
return o;
}
fixed4 frag(V2F i) : SV_TARGET
{
float2 textureCoordinate = (i.screenPosition.xy / i.screenPosition.w) + (_Time * 512);
float staticImage = tex2D(_MainTex, textureCoordinate).r;
return lerp(_Colour1, _Colour2, staticImage);
}
ENDCG
}
}
FallBack "Diffuse"
}