// Simple passthrough
// HDR version, 13-5-09

#include "../common/constants.cg"
#include "../common/hdr.cg"

struct VertOut
{
	float4 pos : POSITION;
	float4 col : COLOR0;
	float2 tc0 : TEXCOORD0;
};

struct FragOut
{
	float4 col : COLOR;
};

FragOut main(
  VertOut vin,
	uniform sampler2D tex0 : TEXUNIT0,
  uniform float alpha,
  uniform float exposure
)
{
  FragOut fout;

  float4 color;
  
  // Original color
  color=tex2D(tex0,vin.tc0);
  
  // HDR -> LDR
  color=ToneMapHDR(color,exposure);

  // Final color
  fout.col.rgb=color;
  fout.col.a=alpha;   // Motion blur blending
  
  return fout;
} 
