/*=============================================================================
	GammaCorrectionPixelShader.usf: Pixel shader for gamma correcting the scene color buffer.
	Copyright © 2006 Epic Games, Inc. All Rights Reserved.
=============================================================================*/

sampler2D SceneColorTexture;

half3 ColorScale;
half4 OverlayColor;
half InverseGamma;

void Main(
	in float2 UV : TEXCOORD0,
	out float4 OutColor : COLOR0
	)
{
	half3 LinearColor = lerp( tex2D(SceneColorTexture,UV).rgb * ColorScale,OverlayColor.rgb,OverlayColor.a);
	// RETURN_COLOR not needed unless writing to SceneColor
	OutColor = float4(pow(saturate(LinearColor),InverseGamma),1);
}
