Unlit.shader 648 B

12345678910111213141516171819202122232425262728293031323334353637
  1. Shader "Unlit"
  2. {
  3. Properties
  4. {
  5. _Color("Color", Color) = (1,1,1,1)
  6. [HideInInspector] __dirty( "", Int ) = 1
  7. }
  8. SubShader
  9. {
  10. Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+0" "IsEmissive" = "true" }
  11. Cull Back
  12. CGPROGRAM
  13. #pragma target 3.0
  14. #pragma surface surf Unlit keepalpha addshadow fullforwardshadows
  15. struct Input
  16. {
  17. half filler;
  18. };
  19. uniform float4 _Color;
  20. inline half4 LightingUnlit( SurfaceOutput s, half3 lightDir, half atten )
  21. {
  22. return half4 ( 0, 0, 0, s.Alpha );
  23. }
  24. void surf( Input i , inout SurfaceOutput o )
  25. {
  26. o.Emission = _Color.rgb;
  27. o.Alpha = 1;
  28. }
  29. ENDCG
  30. }
  31. Fallback "Diffuse"
  32. }