Created
December 15, 2016 00:52
-
-
Save baobao/cbb383566ec69e8d40c6148b12b8840c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Template" | |
{ | |
Properties | |
{ | |
} | |
SubShader | |
{ | |
Tags { "RenderType"="Opaque" } | |
LOD 100 | |
Pass | |
{ | |
CGPROGRAM | |
#pragma vertex vert_img | |
#pragma fragment frag | |
#include "UnityCG.cginc" | |
fixed4 frag (v2f_img i) : SV_Target | |
{ | |
fixed2 resolution = _ScreenParams; | |
fixed2 position = (i.uv*resolution / resolution.xy ); | |
float time = _Time * 30; | |
fixed color = 0.0; | |
color += sin( position.x * cos( time / 15.0 ) * 80.0 ) + cos( position.y * cos( time / 15.0 ) * 10.0 ); | |
color += sin( position.y * sin( time / 10.0 ) * 40.0 ) + cos( position.x * sin( time / 25.0 ) * 40.0 ); | |
color += sin( position.x * sin( time / 5.0 ) * 10.0 ) + sin( position.y * sin( time / 35.0 ) * 80.0 ); | |
color *= sin( time / 10.0 ) * 0.5; | |
return fixed4(color, color * 0.5, sin(color + time / 3.0) * 0.75, 1.0); | |
} | |
ENDCG | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment