 Shader "Alembic/PointsColorBall" {
 Properties {
+    [Toggle(APPLY_TRANSFORM)] _ApplyTransform("Apply Transform", Int) = 1
+    [Toggle(APPLY_SMOOTHING)] _ApplySmoothing("Apply Smoothing", Int) = 1
     _ColorBuffer("Color", 2D) = "white" {}
     _RandomBuffer("Random", 2D) = "white" {}
     _RandomDiffuse("Random Diffuse", Float) = 0.0

    float4 rand = Random(iid);

    ApplyInstanceTransform(iid, I.vertex);
    I.vertex.xyz += rand.xyz * _RandomDiffuse;

    O.color = GetColor(rand.x);
}

void surf(Input I, inout SurfaceOutputStandard O)
{
    float4 c = I.color;
    O.Albedo = c.rgb;
    O.Metallic = _Metallic;

    Tags { "RenderType" = "Opaque" "Queue" = "Geometry+1" }

CGPROGRAM
#pragma target 5.0
#pragma surface surf Standard fullforwardshadows vertex:vert addshadow
#pragma multi_compile ___ APPLY_TRANSFORM
#pragma multi_compile ___ APPLY_SMOOTHING

#include "Assets/AlembicImporter/Shaders/PseudoInstancing.cginc"

