<?xml version="1.0" encoding="utf-8" ?> 

<!-- render path for DX7 fixed function pipeline -->
<RenderPath name="dx7" shaderPath="home:data/shaders/fixed">
    
    <!-- declare shaders and technique aliases -->
    <Shader name="passes" file="shaders:passes.fx" />
    <Shader name="phases" file="shaders:phases.fx" />
    <Shader name="static" file="shaders:DimapLimapEmmapAm.fx" />
    <Shader name="DimapLimapEmmapAm" file="shaders:DimapLimapEmmapAm.fx" />
    <Shader name="LightMapped" file="shaders:DimapLimapEmmapAm.fx" />
    <Shader name="LightMapped2x" file="shaders:DimapLimapEmmapAm.fx" />
    <Shader name="LightMappedATest" file="shaders:DimapLimapEmmapAm.fx" />
     <Shader name="compose" file="shaders:compose.fx" />
   
    <!-- declare variables -->
    <Float4 name="ShadowColor" value="0.0 0.0 0.0 0.25" />
    <Float4 name="FogDistances" value="10.0 60.0 0.0 0.0" />
    <Float4 name="FogColor" value="0.01 0.01 0.10 1.0" />
    
    <!-- <RenderTarget name="offscreen" format="X8R8G8B8" relSize="1.0" /> -->
    <RenderTarget name="offscreen" format="A8R8G8B8" width="225" height="458" />
    <RenderTarget name="offscreen2" format="A8R8G8B8" width="100" height="100" />
    <RenderTarget name="scene" format="X8R8G8B8" relSize="1.0" />

    <!-- the default section for menu screens with composing -->
    <Section name="default">
	        <!-- render pass -->
        <Pass name="color" shader="passes" technique="tPassColor" clearColor="0.6 0.8 1.0 1.0" clearDepth="1.0" clearStencil="0">
            
            <Float4 name="FogDistances" variable="FogDistances" />
            <Float4 name="FogColor" variable="FogColor" />\

			<Phase name="opaque" shader="phases" technique="tPhaseOpaqueNoFog" sort="FrontToBack" lightMode="FFP">
				<Sequence shader="LightMapped" technique="lightmapped" />
				<Sequence shader="LightMapped2x" technique="lightmapped2x" />
			</Phase>
			<Phase name="ls3dDiPhase1" shader="phases" technique="AlphaTest" sort="BackToFront" lightMode="FFP">
	            <Sequence shader="DimapLimapEmmapAm" technique="textured" />
			</Phase>
            
        </Pass>
	        
        <!-- post-draw stuff -->
        <Pass name="gui" drawGui="Yes"/>

    </Section>
    

    <!-- the offscreen section 1 -->
    <Section name="offscreen">

        <!-- render pass -->
        <Pass name="color" shader="passes" technique="tPassColor" renderTarget="offscreen" clearColor="0.0 0.0 0.0 0.0" clearDepth="1.0" clearStencil="0">
            <Phase name="opaque" shader="phases" technique="tPhaseEmotionFX" sort="FrontToBack" lightMode="Off">
                <Sequence shader="static" technique="tStatic" />            
            </Phase>
        </Pass>
        
		<!-- compose the final frame -->
		<Pass name="compose" shader="compose" technique="tCompose2" drawQuad="Yes">
			<Texture name="DiffMap0" value="offscreen" />
		</Pass> 
    </Section>

    <!-- the offscreen section 2 -->
    <Section name="offscreen2">
        <!-- render pass -->
        <Pass name="color" shader="passes" technique="tPassColor" renderTarget="offscreen2" clearColor="0.0 0.0 0.0 0.0" clearDepth="1.0" clearStencil="0">
            <Phase name="opaque" shader="phases" technique="tPhaseEmotionFX" sort="FrontToBack" lightMode="Off">
                <Sequence shader="static" technique="tStatic" />            
            </Phase>
        </Pass>
        
		<!-- compose the final frame -->
		<Pass name="compose" shader="compose" technique="tCompose2" drawQuad="Yes">
			<Texture name="DiffMap0" value="offscreen2" />
		</Pass> 
    </Section>
    
    
    <!-- the default section for fight without composing -->
    <Section name="default2">
        <!-- render pass -->
        <Pass name="color" shader="passes" technique="tPassColor2" clearColor="0.0 0.0 0.0 1.0" clearDepth="1.0" clearStencil="0">
            
            <Float4 name="FogDistances" variable="FogDistances" />
            <Float4 name="FogColor" variable="FogColor" />\

            <Phase name="opaque" shader="phases" technique="tPhaseEmotionFX" sort="FrontToBack" lightMode="Off">
                <Sequence shader="static" technique="tStatic" />          
            </Phase>

			<Phase name="opaque" shader="phases" technique="AlphaTest" sort="FrontToBack" lightMode="FFP">
				<Sequence shader="LightMappedATest" technique="lightmapped2x_atest" />
			</Phase>
			<Phase name="opaque" shader="phases" technique="AlphaTest" sort="FrontToBack" lightMode="FFP">
				<Sequence shader="LightMapped2x" technique="lightmapped2x" />
				<Sequence shader="LightMapped" technique="lightmapped" />
			</Phase>
			<Phase name="ls3dDiPhase1" shader="phases" technique="AlphaTest" sort="BackToFront" lightMode="FFP">
	            <Sequence shader="DimapLimapEmmapAm" technique="textured" />
			</Phase>
             
        </Pass>

		<!-- post-draw stuff -->
		<Pass name="gui" drawGui="Yes"/>

    </Section>
    
    
</RenderPath>
