Last active
December 10, 2018 08:50
-
-
Save sansuke05/2288be9bae771b0832d29085530df23d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 "Custom/Circle" { | |
Properties { | |
_MainTex("Main Texture", 2D) = "white" {} | |
_Color("Base Color", Color) = (0, 0, 0, 1) | |
} | |
SubShader { | |
Tags { | |
"RenderType" = "Opaque" | |
} | |
LOD 200 | |
CGPROGRAM | |
#pragma surface surf Standard | |
#pragma target 3.0 | |
struct Input { | |
float2 uv_MainTex; | |
}; | |
fixed4 _Color; | |
void surf(Input IN, inout SurfaceOutputStandard o) { | |
fixed4 w = fixed4(1, 1, 1, 1); | |
float dist = distance( float2(0.5, 0.5), IN.uv_MainTex)*10; | |
float val = abs(sin(dist*3.0)); | |
o.Albedo = val > 0.98 ? w : _Color ; | |
} | |
ENDCG | |
} | |
Fallback "Diffuse" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment