Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader "Custom/On Off Lighting"
- {
- Properties
- {
- _Color ("Color", Color) = (1,1,1,1)
- _Shadow ("Shadow Color", Color) = (1,1,1,1)
- _ShadowStrength ("Shadow Strength", Range(0,1)) = 0.2
- }
- SubShader {
- Tags { "RenderType" = "Opaque" }
- CGPROGRAM
- #pragma surface surf SimpleLambert
- fixed4 _Color;
- fixed4 _Shadow;
- float _ShadowStrength;
- half4 LightingSimpleLambert (SurfaceOutput s, half3 lightDir, half atten) {
- fixed4 shadow = lerp(_Color, _Shadow, _ShadowStrength);
- return lerp(shadow, _Color, atten);
- }
- struct Input {
- half null;
- };
- void surf (Input IN, inout SurfaceOutput o) {
- o.Albedo = 1;
- }
- ENDCG
- }
- Fallback "Diffuse"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement