vertex_program Stereo/vs glsl glsles glslang hlsl
{
	source stereovs.glsl
	default_params
	{
		param_named_auto worldViewProj worldviewproj_matrix
	}
}

fragment_program Stereo/Interlace_H_fp_GL glsl glsles
{
   source Interlace_H_fp.glsl   
   default_params
   {
      param_named_auto screenSize viewport_size
      param_named LeftTex int 0
		  param_named RightTex int 1
   }
}

fragment_program Stereo/Interlace_H_fp_GLSLang glslang
{
   source Interlace_H_fp.glsl   
   default_params
   {
      param_named_auto screenSize viewport_size
   }
}

fragment_program Stereo/Interlace_H_fp_HLSL hlsl
{
   source Interlace_H_fp.glsl   
   default_params
   {
      param_named_auto screenSize viewport_size
   }
}

fragment_program Stereo/Interlace_V_fp_GL glsl glsl glsles
{
   source Interlace_V_fp.glsl   
   default_params
   {
      param_named_auto screenSize viewport_size
      param_named LeftTex int 0
		  param_named RightTex int 1
   }
}

fragment_program Stereo/Interlace_V_fp_GLSLang glslang
{
   source Interlace_V_fp.glsl   
   default_params
   {
      param_named_auto screenSize viewport_size
   }
}

fragment_program Stereo/Interlace_V_fp_HLSL hlsl
{
   source Interlace_V_fp.glsl   
   default_params
   {
      param_named_auto screenSize viewport_size
   }
}

fragment_program Stereo/Interlace_CB_fp_GL glsl glsles
{
   source Interlace_CB_fp.glsl   
   default_params
   {
      param_named_auto screenSize viewport_size
      param_named LeftTex int 0
		  param_named RightTex int 1
   }
}

fragment_program Stereo/Interlace_CB_fp_GLSLang glslang
{
   source Interlace_CB_fp.glsl   
   default_params
   {
      param_named_auto screenSize viewport_size
   }
}

fragment_program Stereo/Interlace_CB_fp_HLSL hlsl
{
   source Interlace_CB_fp.glsl   
   default_params
   {
      param_named_auto screenSize viewport_size
   }
}

fragment_program Stereo/Anaglyph_RC_fp_GL glsl glsles
{
   source Anaglyph_fp.glsl      
   default_params
   {
      param_named leftMask float4 1.0 0.0 0.0 1.0
      param_named rightMask float4 0.0 1.0 1.0 1.0
      param_named LeftTex int 0
		  param_named RightTex int 1
   }
}

fragment_program Stereo/Anaglyph_RC_fp_GLSLang glslang
{
   source Anaglyph_fp.glsl      
   default_params
   {
      param_named leftMask float4 1.0 0.0 0.0 1.0
      param_named rightMask float4 0.0 1.0 1.0 1.0
   }
}

fragment_program Stereo/Anaglyph_RC_fp_HLSL hlsl
{
   source Anaglyph_fp.glsl      
   default_params
   {
      param_named leftMask float4 1.0 0.0 0.0 1.0
      param_named rightMask float4 0.0 1.0 1.0 1.0
   }
}

fragment_program Stereo/Anaglyph_YB_fp_GL glsl glsles
{
   source Anaglyph_fp.glsl      
   default_params
   {
      param_named leftMask float4 1.0 1.0 0.0 1.0
      param_named rightMask float4 0.0 0.0 1.0 1.0
      param_named LeftTex int 0
		  param_named RightTex int 1
   }
}

fragment_program Stereo/Anaglyph_YB_fp_GLSLang glslang
{
   source Anaglyph_fp.glsl      
   default_params
   {
      param_named leftMask float4 1.0 1.0 0.0 1.0
      param_named rightMask float4 0.0 0.0 1.0 1.0
   }
}

fragment_program Stereo/Anaglyph_YB_fp_HLSL hlsl
{
   source Anaglyph_fp.glsl      
   default_params
   {
      param_named leftMask float4 1.0 1.0 0.0 1.0
      param_named rightMask float4 0.0 0.0 1.0 1.0
   }
}

fragment_program Stereo/SideBySide_fp_GL glsl glsles
{
   source SideBySide_fp.glsl   
   default_params
   {
      param_named LeftTex int 0
		  param_named RightTex int 1
   }
}

fragment_program Stereo/SideBySide_fp_HLSL hlsl glslang
{
   source SideBySide_fp.glsl
}

fragment_program Stereo/UpDown_fp_GL glsl glsles
{
   source UpDown_fp.glsl   
   default_params
   {
      param_named LeftTex int 0
		  param_named RightTex int 1
   }
}

fragment_program Stereo/UpDown_fp_HLSL hlsl glslang
{
   source UpDown_fp.glsl
}

fragment_program Stereo/Oculus_fp_GL glsl glsles
{
  source oculus_cmp.glsl  
	default_params
	{
		param_named LensCentre float2 0.5 0.5
		param_named Scale float2 1.0 1.0
		param_named ScaleIn float2 1.0 1.0
		param_named HmdWarpParam float4 1.0, 0.441, 0.156f, 0
		param_named ChromAbParam float4 0.996, -0.004, 1.014, 0
		param_named projOffset float 0
		
		param_named LeftTex int 0
		param_named RightTex int 1
	}
}

fragment_program Stereo/Oculus_fp_GLSLang glslang
{
  source oculus_cmp.glsl  
	default_params
	{
		param_named LensCentre float2 0.5 0.5
		param_named Scale float2 1.0 1.0
		param_named ScaleIn float2 1.0 1.0
		param_named HmdWarpParam float4 1.0, 0.441, 0.156f, 0
		param_named ChromAbParam float4 0.996, -0.004, 1.014, 0
		param_named projOffset float 0
	}
}

fragment_program Stereo/Oculus_fp_HLSL hlsl
{
  source oculus_cmp.glsl
  target ps_2_a
	default_params
	{
		param_named LensCentre float2 0.5 0.5
		param_named Scale float2 1.0 1.0
		param_named ScaleIn float2 1.0 1.0
		param_named HmdWarpParam float4 1.0, 0.441, 0.156f, 0
		param_named ChromAbParam float4 0.996, -0.004, 1.014, 0
		param_named projOffset float 0
	}
}

fragment_program Stereo/Mono_fp glsl glsles glslang hlsl
{
   source mono_fp.glsl
}

fragment_program Stereo/stMono_fp_GL glsl glsles
{
   source stMono_fp.glsl   
   default_params
   {
      param_named LeftTex int 0
		  param_named RightTex int 1
   }
}

fragment_program Stereo/stMono_fp_HLSL hlsl glslang
{
   source stMono_fp.glsl
}

fragment_program Stereo/Interlace_H_fp unified
{
  delegate Stereo/Interlace_H_fp_GL
  delegate Stereo/Interlace_H_fp_GLSLang
  delegate Stereo/Interlace_H_fp_HLSL
}

fragment_program Stereo/Interlace_V_fp unified
{
  delegate Stereo/Interlace_V_fp_GL
  delegate Stereo/Interlace_V_fp_GLSLang
  delegate Stereo/Interlace_V_fp_HLSL
}

fragment_program Stereo/Interlace_CB_fp unified
{
  delegate Stereo/Interlace_CB_fp_GL
  delegate Stereo/Interlace_CB_fp_GLSLang
  delegate Stereo/Interlace_CB_fp_HLSL
}

fragment_program Stereo/Anaglyph_RC_fp unified
{
  delegate Stereo/Anaglyph_RC_fp_GL
  delegate Stereo/Anaglyph_RC_fp_GLSLang
  delegate Stereo/Anaglyph_RC_fp_HLSL
}

fragment_program Stereo/Anaglyph_YB_fp unified
{
  delegate Stereo/Anaglyph_YB_fp_GL
  delegate Stereo/Anaglyph_YB_fp_GLSLang
  delegate Stereo/Anaglyph_YB_fp_HLSL
}

fragment_program Stereo/SideBySide_fp unified
{
  delegate Stereo/SideBySide_fp_GL
  delegate Stereo/SideBySide_fp_HLSL
}

fragment_program Stereo/UpDown_fp unified
{
  delegate Stereo/UpDown_fp_GL
  delegate Stereo/UpDown_fp_HLSL
}

fragment_program Stereo/Oculus_fp unified
{
  delegate Stereo/Oculus_fp_GL
  delegate Stereo/Oculus_fp_GLSLang
  delegate Stereo/Oculus_fp_HLSL
}

fragment_program Stereo/stMono_fp unified
{
  delegate Stereo/stMono_fp_GL
  delegate Stereo/stMono_fp_HLSL
}

material Stereo/BaseCompositorMaterial
{
	technique
	{
		pass
		{
		  lighting off
      depth_write off
      depth_check off
			cull_hardware none
			vertex_program_ref Stereo/vs
			{
			}
			
			texture_unit Left
			{
				tex_address_mode clamp
				filtering linear linear none
				tex_coord_set 0
			}
			
			texture_unit Right
			{
				tex_address_mode clamp
				filtering linear linear none
				tex_coord_set 0
			}
		}
	}
}

material Stereo/VerticalInterlace : Stereo/BaseCompositorMaterial
{
	technique
	{
		pass
		{		
			fragment_program_ref Stereo/Interlace_V_fp
			{
			}
		}
	}
}

material Stereo/HorizontalInterlace : Stereo/BaseCompositorMaterial
{
	technique
	{
		pass
		{		
			fragment_program_ref Stereo/Interlace_H_fp
			{
			}
		}
	}
}

material Stereo/CheckboardInterlace : Stereo/BaseCompositorMaterial
{
	technique
	{
		pass
		{		
			fragment_program_ref Stereo/Interlace_CB_fp
			{
			}
		}
	}
}

material Stereo/YellowBlueAnaglyph : Stereo/BaseCompositorMaterial
{
	technique
	{
		pass
		{		
			fragment_program_ref Stereo/Anaglyph_YB_fp
			{
			}
		}
	}
}

material Stereo/RedCyanAnaglyph : Stereo/BaseCompositorMaterial
{
	technique
	{
		pass
		{		
			fragment_program_ref Stereo/Anaglyph_RC_fp
			{
			}
		}
	}
}

material Stereo/SideBySide : Stereo/BaseCompositorMaterial
{
	technique
	{
		pass
		{		
			fragment_program_ref Stereo/SideBySide_fp
			{
			}
		}
	}
}

material Stereo/UpDown : Stereo/BaseCompositorMaterial
{
	technique
	{
		pass
		{		
			fragment_program_ref Stereo/UpDown_fp
			{
			}
		}
	}
}

material Stereo/stMono : Stereo/BaseCompositorMaterial
{
	technique
	{
		pass
		{		
			fragment_program_ref Stereo/stMono_fp
			{
			}
		}
	}
}

material Stereo/Oculus
{
	technique
	{
		pass
		{
      lighting off
      depth_write off
      depth_check off
			cull_hardware none
			vertex_program_ref Stereo/vs
			{
			}
      
			fragment_program_ref Stereo/Oculus_fp
			{
			}
			
			texture_unit Left
			{
				tex_address_mode border
				tex_border_colour 0 0 0
				filtering anisotropic anisotropic anisotropic
				tex_coord_set 0
			}
			
			texture_unit Right
			{
				tex_address_mode border
				tex_border_colour 0 0 0
				filtering anisotropic anisotropic anisotropic
				tex_coord_set 0
			}
		}
	}
}

material Stereo/Wireframe
{
	technique
	{
		pass
		{
			polygon_mode wireframe
			cull_hardware none
			lighting off
		}
	}
}

material Stereo/DebugLeft
{
	technique
	{
		pass
		{
			texture_unit
			{
				texture Stereo/Left
			}
		}
	}
}

material Stereo/DebugRight
{
	technique
	{
		pass
		{
			texture_unit
			{
				texture Stereo/Right
			}
		}
	}
}

material Stereo/Mono
{
	technique
	{
		pass
		{
			lighting off
		  depth_write off
		  depth_check off
			cull_hardware none

			texture_unit
			{
				texture Stereo/Mono
			}
		}
	}
}