Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. SubShader {
  2. Tags { "RenderType"="Opaque" }
  3. LOD 200
  4.  
  5. CGPROGRAM
  6. // Physically based Standard lighting model, and enable shadows on all light types
  7. #pragma surface surf Standard fullforwardshadows
  8.  
  9. // Use shader model 3.0 target, to get nicer looking lighting
  10. #pragma target 3.0
  11.  
  12. sampler2D _MainTex;
  13.  
  14. struct Input {
  15. float2 uv_MainTex;
  16. };
  17.  
  18. half _Glossiness;
  19. half _Metallic;
  20. fixed4 _Color;
  21.  
  22. void surf (Input IN, inout SurfaceOutputStandard o) {
  23. // Albedo comes from a texture tinted by color
  24. fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color;
  25. o.Albedo = c.rgb;
  26. // Metallic and smoothness come from slider variables
  27. o.Metallic = _Metallic;
  28. o.Smoothness = _Glossiness;
  29. o.Alpha = c.a;
  30. }
  31. ENDCG
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement