<?xml version="1.0" encoding="iso-8859-1"?>

<CustomShader version="1.0" classRequirement="">
    <LodLevel startDistance="0">
        <Parameters>
            <!--Parameter name="bumpSpeedScale" target="In.mat.bumpSpeedScale" type="float3" /-->
        </Parameters>
        <CodeInjections>
            <CodeInjection position="NUM_TEXCOORDS">
<![CDATA[
#if (defined(AMBIENT) || defined(DIFFUSE) || defined(SPECULAR))
#define FOLIAGE_COLOR_OUTPUT
#endif
]]>
            </CodeInjection>
            <CodeInjection position="GET_TEXCOORDS_VS">
<![CDATA[
// convert from short to 0-1 range
return In.texCoords[texCoordSet]/32767.0;
]]>
            </CodeInjection>
            <CodeInjection position="NEED_FS_NORMAL">
<![CDATA[
#if defined(_NEED_FS_NORMAL)
#undef _NEED_FS_NORMAL
#endif
]]>
            </CodeInjection>
            <CodeInjection position="MATERIALINFO">
<![CDATA[
#if defined(FOLIAGE_COLOR_OUTPUT)
    //uniform float4 bumpSpeedScale;
#endif
]]>
            </CodeInjection>
            <CodeInjection position="GET_POSITION_VS">
<![CDATA[
//float frequency = 0.3;
//float3 direction = float3(1,0,0)*0.1;
//float offset = sin(In.time.y + In.position.x*In.position.y * frequency)*In.texCoords[0].y/32767.0;
return float4(In.position.xyz, 1.0); // + direction * offset, 1.0);
]]>
            </CodeInjection>
            <CodeInjection position="GET_NORMAL_FS">
<![CDATA[
#if defined(_NO_TANGENTSPACE)
    return float3(0, 1, 0);
#else
    return float3(1, 0, 0);
#endif
]]>
            </CodeInjection>
        </CodeInjections>
    </LodLevel>
</CustomShader>
