<?xml version="1.0" encoding="utf-8" ?>
<shader compiler="xmlshader" name="parallax">
  <technique priority="150">
    <?Include /shader/snippets/projection-pass.inc ?>
    <pass>
      <mixmode>
      <?if vars."light 0 type".int == 2 ?>
        <destalphaadd />
      <?else?>
        <srcalphaadd />
      <?endif?>
      </mixmode>
      <buffer source="normal" destination="normal" />
      <buffer source="tangent" destination="texture coordinate 1" />
      <buffer source="binormal" destination="texture coordinate 2" />
      <buffer source="texture coordinate 0" destination="texture coordinate 0" />
      <vp plugin="glcg" file="/shader/parallax/parallax.cgvp" />
      <texture destination="TexNormal" name="tex normal" />
      <texture destination="TexDiffuse" name="tex diffuse" />
      <texture destination="TexHeight" name="tex height" />
      <fp plugin="glcg">
        <cgfp>
          <?Include parallax.cgfp ?>
        </cgfp>
      </fp>
    </pass>
  </technique>
  <technique priority="100">
    <pass>
      <mixmode>
        <add />
      </mixmode>
      <buffer source="normal" destination="normal" />
      <buffer source="tangent" destination="texture coordinate 1" />
      <buffer source="binormal" destination="texture coordinate 2" />
      <buffer source="texture coordinate 0" destination="texture coordinate 0" />
      <vp plugin="glarb" file="/shader/parallax/parallax.avp" />
      <texture destination="unit 0" name="tex normal" />
      <texture destination="unit 1" name="tex diffuse" />
      <texture destination="unit 2" name="tex height" />
      <fp plugin="glarb" file="/shader/parallax/parallax.afp" />
    </pass>
  </technique>
  
  <fallbackshader name="light_bumpmap" file="/shader/light_bumpmap.xml" />
</shader>
