Shader "Hidden/Kinect2MotionDebug" { Properties { _Color("Color", Color) = (1,1,1,1) } SubShader { Tags{ "RenderType" = "Opaque" } LOD 100 Pass { CGPROGRAM #pragma vertex vert #pragma geometry geom #pragma fragment frag #include "UnityCG.cginc" struct v2g { float4 vertex : SV_POSITION; }; struct g2f { float4 vertex : SV_POSITION; }; fixed4 _Color; #ifdef SHADER_API_D3D11 StructuredBuffer ssbo; #endif v2g vert(appdata_base v, uint vid : SV_VertexID) { v2g o = (v2g)0; #ifdef SHADER_API_D3D11 o.vertex = float4(ssbo[vid].xyz, 1); #endif return o; } [maxvertexcount(1)] void geom(point v2g input[1], inout PointStream OutputStream) { g2f o = (g2f)0; o.vertex = UnityObjectToClipPos(input[0].vertex.xyz); OutputStream.Append(o); } fixed4 frag(g2f i) : SV_Target { fixed4 col = fixed4(1, 1, 1, 1); return col; } ENDCG } } }