//
// HDR+bloom; show the bloom (debugging)
// RvG, 16-3-09
//

#include "bloom.cg"

struct VertOut
{
	float2 tc0 : TEXCOORD0;
};

struct FragOut
{
	float4 col : COLOR;
};

FragOut main(
  VertOut vin,
	uniform sampler2D sceneMap    : TEXUNIT0,
	//uniform sampler2D velocityMap : TEXUNIT1,
	uniform sampler2D bloomMap1    : TEXUNIT2,
	uniform sampler2D bloomMap2    : TEXUNIT3,
	uniform sampler2D bloomMap3    : TEXUNIT4,
  uniform float exposure
)
{
  FragOut fout;

  // Scene texel  
  float4 sceneColor=tex2D(sceneMap,vin.tc0); 

  // Bloom additive
  float4 color,bloomColor;
  bloomColor=BloomCombineMaps3(bloomMap1,bloomMap2,bloomMap3,vin.tc0);
  color=bloomColor;

  //const float exposure=1.0;
  //fout.col=ToneMapHDR(color,exposure);
  fout.col=color;

  return fout;
} 
