Guest User

Untitled

a guest
Jan 20th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. Shader "Diffuse-Coloured" {
  2. Properties {
  3. _Color ("Main Color", Color) = (1,1,1,1)
  4. _MainTex ("Base (RGB)", 2D) = "white" {}
  5. }
  6. SubShader {
  7. Tags { "RenderType"="Opaque" }
  8. LOD 200
  9.  
  10. CGPROGRAM
  11. #pragma surface surf Lambert
  12.  
  13. sampler2D _MainTex;
  14. fixed4 _Color;
  15.  
  16. struct Input {
  17. float2 uv_MainTex;
  18. float3 color : COLOR;
  19. };
  20.  
  21. void surf (Input IN, inout SurfaceOutput o) {
  22. fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
  23. o.Albedo = c.rgb *smoothstep(0,1,saturate(IN.color * 1.1)) ;
  24. //o.Albedo = c.rgb;
  25. o.Alpha = c.a;
  26. }
  27. ENDCG
  28. }
  29.  
  30. Fallback "VertexLit"
  31. }
Add Comment
Please, Sign In to add comment