HandShader.shader 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
  2. // Simplified Diffuse shader. Differences from regular Diffuse one:
  3. // - no Main Color
  4. // - fully supports only 1 directional light. Other lights can affect it, but it will be per-vertex/SH.
  5. Shader "Mobile/SCDiffuse" {
  6. Properties{
  7. _MainTex("Base (RGB)", 2D) = "white" {}
  8. _Alpha("Alpha", Range(0.0, 1.0)) = 1.0
  9. _Color("Color", Color) = (1,1,1,1)
  10. }
  11. SubShader
  12. {
  13. Tags { "RenderType" = "Opaque" }
  14. LOD 150
  15. ZWrite Off
  16. Blend SrcAlpha OneMinusSrcAlpha
  17. cull back
  18. CGPROGRAM
  19. #pragma surface surf Lambert noforwardadd keepalpha
  20. sampler2D _MainTex;
  21. fixed _Alpha;
  22. fixed4 _Color;
  23. struct Input {
  24. float2 uv_MainTex;
  25. };
  26. void surf(Input IN, inout SurfaceOutput o) {
  27. fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
  28. o.Albedo = c.rgb;
  29. o.Alpha = _Alpha;
  30. }
  31. ENDCG
  32. }
  33. //Fallback "Mobile/VertexLit"
  34. }