<?xml version="1.0" encoding="utf-8" ?>
<shader compiler="xmlshader" name="extrudeGlow">
<shadervars>
	<shadervar name="amount" type="float">10</shadervar>
	<shadervar name="intensity" type="float">1</shadervar>
	<shadervar name="detail" type="float">1</shadervar>
	<shadervar name="scale" type="float">0</shadervar>
</shadervars>

<technique priority="300">
	
	<?Template eGlowshader N?>
		<pass>
		   <mixmode><add /></mixmode>
		   <buffer source="normal" destination="normal" />
		   <buffer source="texture coordinate 0" destination="texture coordinate 0" />
		   <vp plugin="glcg">
		     <cgvp>
		       <variablemap destination="pass_index" type="float">$N$</variablemap>
		       <variablemap variable="intensity" destination="intensity" />
		       <variablemap variable="detail" destination="detail" />
		       <variablemap variable="amount" destination="amount" />
		       <variablemap variable="scale" destination="scale" />
		       <program file="extrudeGlow.cgvp" />
		     </cgvp>
               </vp>

		   <texture destination="TexDiffuse" name="tex diffuse" />
		   <texture destination="eGlow" name="tex eGlow" />
               <fp plugin="glcg">
		     <cgfp>
		       <variablemap destination="pass_index" type="float">$N$</variablemap>
		       <variablemap variable="intensity" destination="intensity" />
		       <variablemap variable="amount" destination="amount" />
		       <variablemap variable="detail" destination="detail" />
		       <variablemap variable="scale" destination="scale" />
		       <program file="extrudeGlow.cgfp" />
		     </cgfp>
               </fp>
		</pass>
        <?Endtemplate?>

      <?if vars."detail".int == 1 ?>
	  <?Generate X 0 5 ?>
    	    <?eGlowshader $X$ ?>
	  <?Endgenerate?> 
      <?elsif vars."detail".int == 2 ?>
	  <?Generate X 0 10 ?>
    	    <?eGlowshader $X$ ?>
	  <?Endgenerate?> 
      <?elsif vars."detail".int == 3 ?>
	  <?Generate X 0 15 ?>
    	    <?eGlowshader $X$ ?>
	  <?Endgenerate?> 
      <?elsif vars."detail".int == 4 ?>
	  <?Generate X 0 20 ?>
    	    <?eGlowshader $X$ ?>
	  <?Endgenerate?> 
      <?elsif vars."detail".int == 5 ?>
	  <?Generate X 0 25 ?>
    	    <?eGlowshader $X$ ?>
	  <?Endgenerate?> 
      <?elsif vars."detail".int == 6 ?>
	  <?Generate X 0 30 ?>
    	    <?eGlowshader $X$ ?>
	  <?Endgenerate?> 
      <?elsif vars."detail".int == 7 ?>
	  <?Generate X 0 35 ?>
    	    <?eGlowshader $X$ ?>
	  <?Endgenerate?> 
      <?elsif vars."detail".int == 8 ?>
	  <?Generate X 0 40 ?>
    	    <?eGlowshader $X$ ?>
	  <?Endgenerate?> 
      <?else?>
	  <?Generate X 0 10 ?>
    	    <?eGlowshader $X$ ?>
	  <?Endgenerate?>       
 	<?endif?>
  
 </technique> 	      
</shader>