Shader "Grass/GrassBlade" {
    Properties {
        _BladeWidth("Breite", Range(0.003, .1)) = 0.01
        _SegmentsMinusOne("Segments Minus One", Range(1, 60)) = 20
        _BendStrength("Bend Strength", Range(0, 1)) = 1
    }
    SubShader {
        LOD 100
        Cull Off

        //Render Pass
        Pass {
            Tags { "LightMode" = "ForwardBase"}
            CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag
            #pragma geometry geom

            #pragma multi_compile _ SHADOWS_SCREEN

            #include "UnityCG.cginc"
            #include "UnityPBSLighting.cginc"
            #include "AutoLight.cginc"

            #include "./include/Random.hlsl"
            #include "./include/Math.hlsl"
            #include "./include/Culling.hlsl"
            #include "./include/GrassHelpers.hlsl"

            #define IS_IN_BASE_PASS

            #include "./include/GrassBladePass.hlsl"

            ENDCG
        }

        // Shadow Pass
        Pass {
            Tags { "LightMode" = "ShadowCaster" }
            CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag
            #pragma geometry geom

            #include "UnityCG.cginc"

            #include "./include/Random.hlsl"
            #include "./include/Math.hlsl"
            #include "./include/Culling.hlsl"
            #include "./include/GrassHelpers.hlsl"
            
            #define IS_IN_SHADOW_PASS

            #include "./include/GrassBladePass.hlsl"

            ENDCG
        }
    }
}
