
/**************************************************************************

Multiple Render Targets

Allows for #define'd MRTs. See struct PS_OUTPUT

usage:
  - define PS_OUTPUT to include whatever render targets you want
  - define SetPSOuput to set whatever render targets you want
  - in your pixel shader, before your return PS_OUTPUT, 
     pass in whatever values are needed.
     eg
	  SetPSOutput( Out, outColor, float4( campos - IN.posWorld.xyz, 1) );

******************************************************************************/

// Game may define this:
// #define PS_OUTPUT_MRT_CAMERATOWORLD 1
#define MRT_FORCE_BLOOM             2.0f
#define MRT_FORCE_BLOOM_NO_FOG      0.0f


struct PS_OUTPUT
{
    float4 Color    : COLOR0;
#ifdef PS_OUTPUT_MRT_CAMERATOWORLD
	float4 CameraToWorld : COLOR1;
#endif
};


PS_OUTPUT SetPSOutput( out PS_OUTPUT inPSOut, float4 outColor, float4 camToWorld )
{
	inPSOut.Color = outColor;
#ifdef PS_OUTPUT_MRT_CAMERATOWORLD		
	inPSOut.CameraToWorld = camToWorld;
#endif     			 
	return inPSOut;	
}