Merge pull request #1519 from Azaezel/deferredShading

Deferred shading
This commit is contained in:
Areloch 2016-02-27 15:08:20 -06:00
commit 908be4818f
112 changed files with 2645 additions and 680 deletions

View file

@ -42,10 +42,11 @@ uniform vec3 g_fBlueShiftColor;
uniform float g_fBloomScale;
uniform float g_fOneOverGamma;
uniform float Brightness;
uniform float Contrast;
out vec4 OUT_col;
void main()
{
vec4 _sample = hdrDecode( texture( sceneTex, IN_uv0 ) );
@ -94,5 +95,11 @@ void main()
// Apply gamma correction
_sample.rgb = pow( abs(_sample.rgb), vec3(g_fOneOverGamma) );
// Apply contrast
_sample.rgb = ((_sample.rgb - 0.5f) * Contrast) + 0.5f;
// Apply brightness
_sample.rgb += Brightness;
OUT_col = _sample;
}