CarmenSandiego/Assets/Shaders/ScreenNoise.shader
Jamie Greunbaum c0b9374bd6 - Added placeholders for the remaining static Wanted posters.
- Reworked credits display to be more efficient and easy to edit.
- Renamed the Wood shader to a more appropriate and genericised name.
- Reorganised static Wanted posters into their own folder.
2026-03-14 05:40:34 -04:00

63 lines
1.6 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;
float4 _MainTex_ST;
CBUFFER_START(UnityPerMaterial)
uniform float4 _Colour1;
uniform float4 _Colour2;
CBUFFER_END
struct Data
{
float4 vertex : POSITION;
};
struct V2F
{
float4 position : SV_POSITION;
float4 screenuv : TEXCOORD0;
};
V2F vert(Data v)
{
V2F o;
o.position = UnityObjectToClipPos(v.vertex);
o.screenuv = ComputeScreenPos(o.position);
return o;
}
fixed4 frag(V2F i) : SV_TARGET
{
half2 textureCoordinate = ((i.screenuv.xy / i.screenuv.w) % 1.0) * _MainTex_ST.xy;
half coordoffset = (_MainTex_ST.zw * _Time) % 1.0;
textureCoordinate.x += coordoffset;
textureCoordinate.y += coordoffset;
return lerp(_Colour1, _Colour2, tex2D(_MainTex, textureCoordinate).r);
}
ENDCG
}
}
FallBack "Diffuse"
}