/*
   "Ugly old" Reinhard tonemap from MariENB
   (C)2012-2023 Marisa the Magician
*/
vec3 TonemapReinhard( vec3 res )
{
	vec3 tcol = res/(1.+res);
	return pow(tcol,vec3(1./2.2));
}
void main()
{
	vec2 coord = TexCoord;
	vec4 res = texture(InputTexture,coord);
	vec3 mapped = TonemapReinhard(pow(max(res.rgb*texposure,vec3(0.)),vec3(2.2)));
	res.rgb = mix(res.rgb,mapped,tblend);
	FragColor = res;
}
