mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
add back in brightness and contrast controls, as well as the capacity to shut tonemapping off
This commit is contained in:
parent
551b1c5ce6
commit
17d3531206
2 changed files with 25 additions and 3 deletions
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue