Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader "Custom/CosmicEffect"
- {
- Properties
- {
- _MainTex ("Texture", 2D) = "white" {}
- _Zoom ("Zoom", Range(0.5, 20)) = 1
- _Speed ("Speed", Range(0.01, 10)) = 1
- }
- SubShader
- {
- Pass
- {
- CGPROGRAM
- #pragma vertex vert
- #pragma fragment frag
- #include "UnityCG.cginc"
- float4 vert (appdata_base v) : SV_POSITION
- {
- return mul(UNITY_MATRIX_MVP, v.vertex);
- }
- sampler2D _MainTex;
- half _Zoom;
- half _Speed;
- fixed4 frag (float4 i : VPOS) : SV_Target
- {
- return tex2D(_MainTex, float2((i.xy/ _ScreenParams.xy) + float2(_CosTime.x * _Speed, _SinTime.x * _Speed) / _Zoom));
- }
- ENDCG
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement