
shader()
{
    cull("none")
    sortweight("blended_alphatest") // trzeba zostawic bo wykrzacza sie na gf2

    pass()
    {
        stream()
        {
            position( "float3", "SS_POSITION" )
//            diffuse( "color", "SS_DIFFUSE" )
            texcoord( 0, "float2", "SS_TEXCOORD0" )
        }

        tmu()
        {
            texture()
            {
                image( txGrassTexture )
                addressfunc("clamp", "clamp", "clamp")
            }

            ColorOp( "arg1", "texture", "current", "current" )
            AlphaOp( "arg1", "texture", "current", "current" )
        }

        tmu()
        {
            TexGen("planar")
            TexMod("scale", "const", fTerrainInvSize, 0, 0, "const", fTerrainInvSize, 0, 0)

            texture()
            {
                image( txTerrainColor )
                addressfunc("clamp", "clamp", "clamp")
            }

            ColorOp( "mul", "texture", "current", "current" )
            AlphaOp( "arg2", "texture", "current", "current" )
        }

        AlphaFunc( "gequal", 128 )
    }
}

