Advertisement
Guest User

Untitled

a guest
Apr 14th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Upgrade NOTE: upgraded instancing buffer 'Props' to new syntax.
  2.  
  3. Shader "Custom/ColoredPoint" {
  4.     Properties{
  5.         //      _Color ("Color", Color) = (1,1,1,1)
  6.         //      _MainTex ("Albedo (RGB)", 2D) = "white" {}
  7.         _Glossiness("Smoothness", Range(0,1)) = 0.5
  8.         _Metallic("Metallic", Range(0,1)) = 0.0
  9.     }
  10.         SubShader{
  11.         Tags{ "RenderType" = "Opaque" }
  12.         LOD 200
  13.  
  14.         CGPROGRAM
  15. #pragma enable_d3d11_debug_symbols
  16. #pragma surface surf Standard fullforwardshadows
  17. #pragma target 3.0
  18.  
  19.         //      sampler2D _MainTex;
  20.  
  21.         struct Input {
  22.         //          float2 uv_MainTex;
  23.         float3 worldPos;
  24.     };
  25.  
  26.     half _Glossiness;
  27.     half _Metallic;
  28.     //      fixed4 _Color;
  29.  
  30.     UNITY_INSTANCING_BUFFER_START(Props)
  31.         UNITY_INSTANCING_BUFFER_END(Props)
  32.  
  33.         void surf(Input IN, inout SurfaceOutputStandard o) {
  34.         //          fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color;
  35.         //          o.Albedo = c.rgb;
  36.         o.Albedo.r = IN.worldPos.x;
  37.         o.Metallic = _Metallic;
  38.         o.Smoothness = _Glossiness;
  39.         //          o.Alpha = c.a;
  40.         o.Alpha = 1;
  41.     }
  42.     ENDCG
  43.     }
  44.         FallBack "Diffuse"
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement