!include("..\\..\\common\\surface.def")
Shader()
{
	SurfaceID(SRF_PLEXIGLASS)
	sortweight( "translucent0" )
	Cull("cw")
   Pass()
   {
        Stream()
        {
            Position("float3", "SS_POSITION")
            Normal("float3", "SS_NORMAL")
            Texcoord(0, "float2", "SS_TEXCOORD0")
            Texcoord(2, "float2", "SS_TEXCOORD3")
        }

        tmu()
        {
            Texture()
            {
                Image(TEXTURE1)
            }
            ColorOp("arg1", "texture", "current", "current")
            AlphaOp("arg1", "texture", "current", "current")
        }

        tmu()
        {
            TexGen("reflection")
            Texture()
            {
                Cubemap("CH_T_Env.png","CH_T_Env.png","CH_T_Env.png","CH_T_Env.png","CH_T_Env.png","CH_T_Env.png")
            }
            ColorOp("mul_add", "texture", "inv_current_a", "current")
            AlphaOp("arg2", "texture", "current", "current")
        }

        tmu()
        {
            Texture()
            {
                Lightmap()
            }
            ColorOp("mul", "texture", "current", "current")
            AlphaOp("mul", "current", "tfactor", "current")
        }
		tfactor(1.0, 1.0, 1.0, 1.0)
        colorgen("tfactor", "none", 0,0,0, "user", 0,0,0)
        BlendFuncFade("src_alpha", "inv_src_alpha")
        BlendFunc( "src_alpha", "inv_src_alpha" )
        DepthFunc("lequal", 0)
    }

    lightpass()

    !include("..\\lights\\spot_shadowmap.mtt")
    !include("..\\lights\\omni_2TMU.mtt")
}
