
abstract target main_stereo_render
{
	//Eye render
	pass render_scene
	{
		load
		{
			all				clear
			clear_colour	0.2 0.4 0.6 1
		}
		store
		{
			depth	dont_care
			stencil	dont_care
		}

		//0x01234567
		identifier 19088743

		overlays	off

		cull_camera VrCullCamera

		shadows		ShadowMapDebuggingShadowNode

		instanced_stereo true
		viewport 0 0.0 0.0 0.5 1.0
		viewport 1 0.5 0.0 0.5 1.0
	}

	//Render overlays last on the entire screen
	pass render_scene
	{
		rq_first	254
		rq_last		255

		overlays	on
	}
}


compositor_node Tutorial_OpenVRNodeRDM
{
	in 0 stereo_output

	texture rtt target_width target_height target_format msaa 4

	target rtt : main_stereo_render	{}

	target stereo_output
	{
		pass compute
		{
			job VR/RadialDensityMaskReconstruct

			input 0 rtt
			uav 0 stereo_output write PFG_RGBA8_UNORM
		}
	}
}

compositor_node Tutorial_OpenVRNodeNoRDM
{
	in 0 stereo_output

	target stereo_output : main_stereo_render	{}
}

compositor_node Tutorial_OpenVRMirrorWindowNode
{
	in 0 rt_renderwindow
	in 1 stereo_results

	target rt_renderwindow
	{
		//Eye render
		pass render_quad
		{
			load { all dont_care }
			store
			{
				depth	dont_care
				stencil	dont_care
			}
			material Ogre/Copy/4xFP32
			input 0 stereo_results
		}
	}
}

workspace Tutorial_OpenVRWorkspaceRDM
{
	connect_output Tutorial_OpenVRNodeRDM 0
}

workspace Tutorial_OpenVRWorkspaceNoRDM
{
	connect_output Tutorial_OpenVRNodeNoRDM 0
}

workspace Tutorial_OpenVRMirrorWindowWorkspace
{
	connect_external 0 Tutorial_OpenVRMirrorWindowNode 0
	connect_external 1 Tutorial_OpenVRMirrorWindowNode 1
}
