<Render NAME="Base">
  <!-- SOLID -->
  <MATERIAL NAME="MT_DIFFUSE_SOLID">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_LESSEQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>

    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_DIFFUSE_SOLID_2D">
    <RenderState STATE="D3DRS_LIGHTING">FALSE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>

    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>


  <MATERIAL NAME="MT_DIFFUSE_SOLID_SMOOTH">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_LESSEQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <SamplerState TYPE = "SMOOTH">TRUE</SamplerState>
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_DIFFUSE_SOLID_2D_SMOOTH">
    <RenderState STATE="D3DRS_LIGHTING">FALSE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <SamplerState TYPE = "SMOOTH">TRUE</SamplerState>
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_TEXTURE_SOLID">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_LESSEQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_TEXTURE_SOLID_2D">
    <RenderState STATE="D3DRS_LIGHTING">FALSE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>


  <MATERIAL NAME="MT_TEXTURE_SOLID_SMOOTH">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_LESSEQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE = "SMOOTH">TRUE</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_TEXTURE_SOLID_2D_SMOOTH">
    <RenderState STATE="D3DRS_LIGHTING">FALSE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
      <SamplerState TYPE = "SMOOTH">TRUE</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>


  <!-- ALPHA -->

  <MATERIAL NAME="MT_DIFFUSE_ALPHA">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_LESSEQUAL</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_DIFFUSE_ALPHA_2D">
    <RenderState STATE="D3DRS_LIGHTING">FALSE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_DIFFUSE_ALPHA_SMOOTH">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_LESSEQUAL</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE = "SMOOTH">TRUE</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_DIFFUSE_ALPHA_2D_SMOOTH">
    <RenderState STATE="D3DRS_LIGHTING">FALSE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE = "SMOOTH">TRUE</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>


  <MATERIAL NAME="MT_TEXTURE_ALPHA">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_LESSEQUAL</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_TEXTURE_ALPHA_2D">
    <RenderState STATE="D3DRS_LIGHTING">FALSE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_NONE</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>


  <MATERIAL NAME="MT_TEXTURE_ALPHA_SMOOTH">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_LESSEQUAL</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE = "SMOOTH">TRUE</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_TEXTURE_ALPHA_2D_SMOOTH">
    <RenderState STATE="D3DRS_LIGHTING">FALSE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE = "SMOOTH">TRUE</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>


  <MATERIAL NAME="MT_DIFFUSE_ALPHA_TEXTURE">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_LESSEQUAL</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_DIFFUSE_ALPHA_TEXTURE_2D">
    <RenderState STATE="D3DRS_LIGHTING">FALSE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CCW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>


  <MATERIAL NAME="MT_DIFFUSE_ALPHA_TEXTURE_SMOOTH">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_LESSEQUAL</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE = "SMOOTH">TRUE</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_DIFFUSE_ALPHA_TEXTURE_2D_SMOOTH">
    <RenderState STATE="D3DRS_LIGHTING">FALSE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CCW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE = "SMOOTH">TRUE</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

	<MATERIAL NAME="MT_TEXTURE_ALPHA_LOGO">
		<RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
		<RenderState STATE="D3DRS_CULLMODE">D3DCULL_NONE</RenderState>
		<RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
		<RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
		<RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
		<RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
		<RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
		<RenderState STATE="D3DRS_ZFUNC">D3DCMP_LESSEQUAL</RenderState>
		<RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
		<RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
		<RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
		<RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
		<RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
		<RenderState STATE="D3DRS_STENCILENABLE">FALSE</RenderState>
    		<RenderState STATE="D3DRS_CLIPPING">FALSE</RenderState>
    		<RenderState STATE="D3DRS_ANTIALIASEDLINEENABLE">FALSE</RenderState>
    		<RenderState STATE="D3DRS_CLIPPLANEENABLE">FALSE</RenderState>
    		<RenderState STATE="D3DRS_VERTEXBLEND">FALSE</RenderState>
    		<RenderState STATE="D3DRS_INDEXEDVERTEXBLENDENABLE">FALSE</RenderState>

		<RenderState STATE="D3DRS_COLORVERTEX">TRUE</RenderState>
		<RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_COLOR1</RenderState>
		<STAGE NUM="0">
			<TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG1</TextureStageState>
			<TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
			<TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
			<TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
			<TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
			<TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
			<SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
			<SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
			<SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
			<TextureStageState TYPE="D3DTSS_TEXTURETRANSFORMFLAGS">D3DTTFF_DISABLE</TextureStageState>
			<SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
			<SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
		</STAGE>
		<STAGE NUM="1">
			<TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
			<TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
		</STAGE>
	</MATERIAL>


  <!-- FONT RENDER-->

  <MATERIAL NAME="RS_FONTRENDER">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CCW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_FALSE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_STENCILENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_CLIPPING">TRUE</RenderState>
    <RenderState STATE="D3DRS_ANTIALIASEDLINEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_CLIPPLANEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_VERTEXBLEND">FALSE</RenderState>
    <RenderState STATE="D3DRS_INDEXEDVERTEXBLENDENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">TRUE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_TEXCOORDINDEX">0</TextureStageState>
      <TextureStageState TYPE="D3DTSS_TEXTURETRANSFORMFLAGS">D3DTTFF_DISABLE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="RS_FONTRENDER_1">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CCW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_FALSE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_STENCILENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_CLIPPING">TRUE</RenderState>
    <RenderState STATE="D3DRS_ANTIALIASEDLINEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_CLIPPLANEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_VERTEXBLEND">FALSE</RenderState>
    <RenderState STATE="D3DRS_INDEXEDVERTEXBLENDENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_TEXCOORDINDEX">0</TextureStageState>
      <TextureStageState TYPE="D3DTSS_TEXTURETRANSFORMFLAGS">D3DTTFF_DISABLE</TextureStageState>
      <SamplerState TYPE = "SMOOTH">TRUE</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="RS_FONTRENDER_2">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CCW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_FALSE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_STENCILENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_CLIPPING">TRUE</RenderState>
    <RenderState STATE="D3DRS_ANTIALIASEDLINEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_CLIPPLANEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_VERTEXBLEND">FALSE</RenderState>
    <RenderState STATE="D3DRS_INDEXEDVERTEXBLENDENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_TEXCOORDINDEX">0</TextureStageState>
      <TextureStageState TYPE="D3DTSS_TEXTURETRANSFORMFLAGS">D3DTTFF_DISABLE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="RS_FONTRENDER_3">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CCW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_FALSE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_STENCILENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_CLIPPING">TRUE</RenderState>
    <RenderState STATE="D3DRS_ANTIALIASEDLINEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_CLIPPLANEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_VERTEXBLEND">FALSE</RenderState>
    <RenderState STATE="D3DRS_INDEXEDVERTEXBLENDENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_TEXCOORDINDEX">0</TextureStageState>
      <TextureStageState TYPE="D3DTSS_TEXTURETRANSFORMFLAGS">D3DTTFF_DISABLE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <!-- MOUSE_CURSOR -->

  <MATERIAL NAME="MT_MOUSE_CURSOR">
    <RenderState STATE="D3DRS_LIGHTING">FALSE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_NONE</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_FALSE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <!-- RENDER PARTICLE -->
  <MATERIAL NAME="MT_PARTICLE">
    <RenderState STATE="D3DRS_LIGHTING">FALSE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_NONE</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_ADD</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_PARTICLE_GAME">
    <RenderState STATE="D3DRS_LIGHTING">FALSE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_NONE</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">TRUE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_COLOR1</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_PARTICLE_GAME_Z">
    <RenderState STATE="D3DRS_LIGHTING">FALSE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_NONE</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_LESSEQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">TRUE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_COLOR1</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_PARTICLE_OVERLAY_GAME_Z">
    <RenderState STATE="D3DRS_LIGHTING">FALSE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_NONE</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_DESTCOLOR</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_LESSEQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">TRUE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_COLOR1</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_PARTICLE_OVERLAY_COLOR">
    <RenderState STATE="D3DRS_LIGHTING">FALSE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_NONE</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_DESTCOLOR</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_LESSEQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">TRUE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_COLOR1</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG2</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_PARTICLE_OVERLAY">
    <RenderState STATE="D3DRS_LIGHTING">FALSE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_NONE</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_FALSE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>

    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_DESTCOLOR</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_SRCALPHA</RenderState>

    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_ADD</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <!-- RENDER GAME OBJECTS -->

  <MATERIAL NAME="MT_FIRE">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_NONE</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_LESSEQUAL</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_MISLYA">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_NONE</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_LUCHI_PIL">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_CURRENT</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_CURRENT</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="2">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <!-- OVERLAY -->

  <MATERIAL NAME="MT_TEXTURE_OVERLAY">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_LESSEQUAL</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_DESTCOLOR</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_TEXTURE_ALPHA_SMOOTH_OVERLAY">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_NONE</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_FALSE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>

    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_DESTCOLOR</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_SRCALPHA</RenderState>

    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE = "SMOOTH">TRUE</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>


  <MATERIAL NAME="MT_TEXTURE_ALPHA_SMOOTH_OVERLAY2">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_NONE</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_FALSE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>

    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_DESTCOLOR</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_SRCALPHA</RenderState>

    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG2</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE = "SMOOTH">TRUE</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_TEXTURE_ALPHA_SMOOTH_OVERLAY2_Z">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_NONE</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_LESSEQUAL</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>

    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_DESTCOLOR</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_SRCALPHA</RenderState>

    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG2</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE = "SMOOTH">TRUE</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_TEXTURE_ALPHA_OVERLAY">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_NONE</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_FALSE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>

    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_DESTCOLOR</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_SRCALPHA</RenderState>

    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <!-- ????? -->

  <MATERIAL NAME="MT_TEXTURE_ALPHA_CULL_NONE">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_NONE</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_FALSE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_POINT</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>


  <MATERIAL NAME="MT_TEXTURE_ALPHA_SMOOTH_COLOR_MODULATE">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_NONE</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_FALSE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>

    <RenderState STATE="D3DRS_ALPHAFUNC">D3DCMP_GREATEREQUAL</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>

    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE = "SMOOTH">TRUE</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <MATERIAL NAME="MT_DIFFUSE_ADD_TEXTURE_ALPHA_SMOOTH">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_NONE</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_FALSE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_ADD</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_TEXTURE</TextureStageState>
      <SamplerState TYPE = "SMOOTH">TRUE</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

  <!-- TRUNCATE -->

  <MATERIAL NAME="MT_TRUNCATE_ALPHA">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x0f</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_DIFFUSE</TextureStageState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>
  
  <MATERIAL NAME="MT_TRUNCATE_ALPHA2">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_CW</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_TRUE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>
    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_SRCALPHA</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_INVSRCALPHA</RenderState>
    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x0f</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_SELECTARG1</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_DISABLE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_DISABLE</TextureStageState>
    </STAGE>
  </MATERIAL>

<!--======================================================================================================-->

  <MATERIAL NAME="MT_TEXTURE_ALPHA_SMOOTH_SECONDTEX_MULTALPHA">
    <RenderState STATE="D3DRS_LIGHTING">TRUE</RenderState>
    <RenderState STATE="D3DRS_CULLMODE">D3DCULL_NONE</RenderState>
    <RenderState STATE="D3DRS_SHADEMODE">D3DSHADE_GOURAUD</RenderState>
    <RenderState STATE="D3DRS_FOGENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_FILLMODE">D3DFILL_SOLID</RenderState>
    <RenderState STATE="D3DRS_ZENABLE">D3DZB_FALSE</RenderState>
    <RenderState STATE="D3DRS_ZWRITEENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ZFUNC">D3DCMP_ALWAYS</RenderState>
    <RenderState STATE="D3DRS_ALPHABLENDENABLE">TRUE</RenderState>

    <RenderState STATE="D3DRS_SRCBLEND">D3DBLEND_DESTCOLOR</RenderState>
    <RenderState STATE="D3DRS_DESTBLEND">D3DBLEND_SRCALPHA</RenderState>

    <RenderState STATE="D3DRS_ALPHATESTENABLE">FALSE</RenderState>
    <RenderState STATE="D3DRS_ALPHAREF">0x01</RenderState>
    <RenderState STATE="D3DRS_COLORVERTEX">FALSE</RenderState>
    <RenderState STATE="D3DRS_DIFFUSEMATERIALSOURCE">D3DMCS_MATERIAL</RenderState>
    <STAGE NUM="0">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG2</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_CURRENT</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTA_DIFFUSE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_DIFFUSE</TextureStageState>
      <SamplerState TYPE = "SMOOTH">FALSE</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    </STAGE>
    <STAGE NUM="1">
      <TextureStageState TYPE="D3DTSS_COLOROP">D3DTOP_SELECTARG2</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG1">D3DTA_CURRENT</TextureStageState>
      <TextureStageState TYPE="D3DTSS_COLORARG2">D3DTOP_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAOP">D3DTOP_MODULATE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG1">D3DTA_TEXTURE</TextureStageState>
      <TextureStageState TYPE="D3DTSS_ALPHAARG2">D3DTA_CURRENT</TextureStageState>
      <SamplerState TYPE = "SMOOTH">FALSE</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSU">D3DTADDRESS_WRAP</SamplerState>
      <SamplerState TYPE="D3DSAMP_ADDRESSV">D3DTADDRESS_WRAP</SamplerState>
    
      <SamplerState TYPE="D3DSAMP_MIPFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MAGFILTER">D3DTEXF_LINEAR</SamplerState>
      <SamplerState TYPE="D3DSAMP_MINFILTER">D3DTEXF_LINEAR</SamplerState>

    </STAGE>
  </MATERIAL>

  
</Render>