Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader "Heat Haze"
- {
- Properties
- {
- _MainTex ("Base (RGB)", RECT) = "white" {}
- _DisortTex ("Disortion Normal (RGB)", 2D) = "white" {}
- _DisortStrength ("Disortion Strength", Float) = 0.1
- _DisortSpeed ("Disortion Strength", Vector) = (0.0, 1.0, 0.0, 0.0)
- }
- SubShader
- {
- Pass
- {
- ZTest Always
- Cull Off
- ZWrite Off
- Fog { Mode off }
- CGPROGRAM
- #pragma vertex vert_img
- #pragma fragment frag
- #pragma fragmentoption ARB_precision_hint_fastest
- #include "UnityCG.cginc"
- uniform samplerRECT _MainTex;
- uniform sampler2D _DisortTex;
- uniform float _DisortStrength;
- uniform float4 _DisortSpeed;
- float4 frag (v2f_img i) : COLOR
- {
- float4 disortion = tex2D(_DisortTex, i.uv)*2.0-1.0;
- disortion = normalize(disortion);
- float4 original = texRECT(_MainTex, i.uv+disortion.rg*_DisortStrength+_DisortSpeed*_Time.x);
- return original;
- }
- ENDCG
- }
- }
- Fallback off
- }
Add Comment
Please, Sign In to add comment