add back in brightness and contrast controls, as well as the capacity to shut tonemapping off

This commit is contained in:
Azaezel 2018-11-12 22:54:00 -06:00
parent 551b1c5ce6
commit 17d3531206
2 changed files with 25 additions and 3 deletions

View file

@ -101,7 +101,17 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
sample.g = TORQUE_TEX1D( colorCorrectionTex, sample.g ).g; sample.g = TORQUE_TEX1D( colorCorrectionTex, sample.g ).g;
sample.b = TORQUE_TEX1D( colorCorrectionTex, sample.b ).b; sample.b = TORQUE_TEX1D( colorCorrectionTex, sample.b ).b;
sample = float4(tonemap(sample.rgb),1); // Apply contrast
sample.rgb = ((sample.rgb - 0.5f) * Contrast) + 0.5f;
// Apply brightness
//sample.rgb += Brightness;
//tonemapping - TODO fix up eye adaptation
if ( g_fEnableToneMapping > 0.0f )
{
sample.rgb = tonemap(sample.rgb);
}
return sample; return sample;
} }

View file

@ -105,5 +105,17 @@ void main()
_sample.g = texture( colorCorrectionTex, _sample.g ).g; _sample.g = texture( colorCorrectionTex, _sample.g ).g;
_sample.b = texture( colorCorrectionTex, _sample.b ).b; _sample.b = texture( colorCorrectionTex, _sample.b ).b;
// Apply contrast
_sample.rgb = ((_sample.rgb - 0.5f) * Contrast) + 0.5f;
// Apply brightness
//_sample.rgb += Brightness;
//tonemapping - TODO fix up eye adaptation
if ( g_fEnableToneMapping > 0.0f )
{
_sample.rgb = tonemap(_sample.rgb);
}
OUT_col = _sample; OUT_col = _sample;
} }