vertex_program Ogre/Island/FullScreenQuadVS hlsl
{
	source Island.hlsl
	entry_point FullScreenQuadVS
	target vs_4_0

	default_params
	{

	}
}

fragment_program Ogre/Island/RefractionDepthManualResolvePS1 hlsl
{
	source Island.hlsl
	entry_point RefractionDepthManualResolvePS1
	target ps_4_0
	
	default_params
	{

	}	
}

fragment_program Ogre/Island/RefractionDepthManualResolvePS2 hlsl
{
	source Island.hlsl
	entry_point RefractionDepthManualResolvePS2
	target ps_4_0
	
	default_params
	{

	}	
}

fragment_program Ogre/Island/RefractionDepthManualResolvePS4 hlsl
{
	source Island.hlsl
	entry_point RefractionDepthManualResolvePS2
	target ps_4_0
	
	default_params
	{

	}	
}

material Ogre/Island/RefractionDepthManualResolve
{
	technique RefractionDepthManualResolve
	{
		pass MS1
		{
			vertex_program_ref Ogre/Island/FullScreenQuadVS
			{
			
			}
			fragment_program_ref Ogre/Island/RefractionDepthManualResolvePS1
			{
			
			}
			
			cull_hardware none
			depth_check off
			depth_write off
		}
		pass MS2
		{
			vertex_program_ref Ogre/Island/FullScreenQuadVS
			{
			
			}
			fragment_program_ref Ogre/Island/RefractionDepthManualResolvePS2
			{
			
			}
			
			cull_hardware none
			depth_check off
			depth_write off	
		}
		pass MS4
		{
			vertex_program_ref Ogre/Island/FullScreenQuadVS
			{
			
			}
			fragment_program_ref Ogre/Island/RefractionDepthManualResolvePS4
			{
			
			}
			
			cull_hardware none
			depth_check off
			depth_write off
		}
	}

}

fragment_program Ogre/Island/MainToBackBufferPS hlsl
{
	source Island.hlsl
	entry_point MainToBackBufferPS
	target ps_4_0
	
	default_params
	{
		param_named g_MainBufferSizeMultiplier float2 0.0 0.0
	}	
}

material Ogre/Island/MainToBackBuffer
{
	technique MainToBackBuffer
	{
		pass Solid
		{
			vertex_program_ref Ogre/Island/FullScreenQuadVS
			{
			
			}
			fragment_program_ref Ogre/Island/MainToBackBufferPS
			{
			
			}
			
			cull_hardware none
			depth_check off
			depth_write off
		}
	}
}

vertex_program Ogre/Island/WaterNormalmapCombineVS hlsl
{
	source Island.hlsl
	entry_point WaterNormalmapCombineVS
	target vs_4_0

	default_params
	{

	}
}

fragment_program Ogre/Island/WaterNormalmapCombinePS hlsl
{
	source Island.hlsl
	entry_point WaterNormalmapCombinePS
	target ps_4_0
	
	default_params
	{
		param_named_auto g_CameraPosition camera_position
		param_named g_WaterBumpTexcoordShift float2 0.0 0.0
	}	
}

material Ogre/Island/WaterNormalmapCombine
{
	technique WaterNormalmapCombine
	{
		pass Solid
		{
			vertex_program_ref Ogre/Island/WaterNormalmapCombineVS
			{
			
			}
			fragment_program_ref Ogre/Island/WaterNormalmapCombinePS
			{
			
			}
			
			cull_hardware none
			depth_check off
			depth_write off
		}
	}
}

vertex_program Ogre/Island/PassThroughVS hlsl
{
	source Island.hlsl
	entry_point PassThroughVS
	target vs_5_0

	default_params
	{

	}
}

tessellation_hull_program Ogre/Island/PatchHS hlsl
{
	source Island.hlsl
	entry_point PatchHS
	target hs_5_0

	default_params
	{
		param_named g_FrustumCullInHS float 0.0
		param_named g_TerrainBeingRendered float 0.0
		param_named_auto g_ModelViewProjectionMatrix worldviewproj_matrix
		param_named_auto g_CameraPosition camera_position
		param_named_auto g_CameraDirection view_direction
	}
}

tessellation_domain_program Ogre/Island/HeightFieldPatchDS hlsl
{
	source Island.hlsl
	entry_point HeightFieldPatchDS
	target ds_5_0

	default_params
	{
		param_named g_RenderCaustics float 0.0
		param_named g_UseDynamicLOD float 0.0
		param_named g_DynamicTessFactor float 0.0
		param_named g_StaticTessFactor float 0.0
		param_named g_SkipCausticsCalculation float 0.0
		param_named_auto g_ModelViewProjectionMatrix worldviewproj_matrix
		param_named_auto g_CameraPosition camera_position
	}
}

fragment_program Ogre/Island/HeightFieldPatchPS hlsl
{
	source Island.hlsl
	entry_point HeightFieldPatchPS
	target ps_5_0

	default_params
	{
		param_named g_HalfSpaceCullSign float 0.0
		param_named g_HalfSpaceCullPosition float 0.0
		param_named_auto g_LightModelViewProjectionMatrix worldviewproj_matrix
		param_named_auto g_CameraPosition camera_position
		param_named_auto g_LightPosition light_position
	}
}

fragment_program Ogre/Island/ColorPS hlsl
{
	source IslandCommon.hlsl
	entry_point ColorPS
	target ps_5_0

	default_params
	{

	}
}

material Ogre/Island/RenderHeightfield
{
	technique RenderHeightfield
	{
		pass Solid
		{
			vertex_program_ref Ogre/Island/PassThroughVS
			{
			
			}
			tessellation_hull_program_ref Ogre/Island/PatchHS
			{
			
			}
			tessellation_domain_program_ref Ogre/Island/HeightFieldPatchDS
			{
			
			}			
			fragment_program_ref Ogre/Island/HeightFieldPatchPS
			{
			
			}
			
			depth_check on
			depth_write on
		}
		
		pass DepthOnly
		{
			vertex_program_ref Ogre/Island/PassThroughVS
			{
			
			}
			tessellation_hull_program_ref Ogre/Island/PatchHS
			{
			
			}
			tessellation_domain_program_ref Ogre/Island/HeightFieldPatchDS
			{
			
			}			
			fragment_program_ref Ogre/Island/ColorPS
			{
			
			}
			
			depth_check on
			depth_write on
		}
	}
}

tessellation_domain_program Ogre/Island/WaterPatchDS hlsl
{
	source Island.hlsl
	entry_point WaterPatchDS
	target ds_5_0

	default_params
	{
		param_named g_UseDynamicLOD float 0.0
		param_named g_DynamicTessFactor float 0.0
		param_named g_StaticTessFactor float 0.0	
		param_named_auto g_ModelViewProjectionMatrix worldviewproj_matrix
		param_named_auto g_CameraPosition camera_position
		param_named_auto g_LightPosition light_position
		param_named g_WaterBumpTexcoordShift float2 0.0 0.0
	}
}

fragment_program Ogre/Island/WaterPatchPS hlsl
{
	source IslandCommon.hlsl
	entry_point WaterPatchPS
	target ps_5_0

	default_params
	{
		param_named_auto g_ModelViewMatrix worldview_matrix
		param_named_auto g_ModelViewProjectionMatrix worldviewproj_matrix
		param_named_auto g_LightModelViewProjectionMatrix worldviewproj_matrix
		param_named_auto g_CameraPosition camera_position
		param_named_auto g_LightPosition light_position
		param_named g_WaterBumpTexcoordShift float2 0.0 0.0
		param_named g_ScreenSizeInv float2 0.0 0.0
		param_named g_ZNear float 0.0
		param_named g_ZFar float 0.0
		param_named g_something float 10.0
	}
}

material Ogre/Island/RenderWater
{
	technique RenderWater
	{
		pass Solid
		{
			vertex_program_ref Ogre/Island/PassThroughVS
			{
			
			}
			tessellation_hull_program_ref Ogre/Island/PatchHS
			{
			
			}
			tessellation_domain_program_ref Ogre/Island/WaterPatchDS
			{
			
			}			
			fragment_program_ref Ogre/Island/WaterPatchPS
			{
			
			}

			depth_check on
			depth_write on
		}

	}
}
