Add tone mapping to overlay shaders

This commit is contained in:
Zach Pomerantz 2016-02-05 11:18:42 -08:00
parent a1ed29e6f8
commit b0a9c299ed
2 changed files with 8 additions and 2 deletions

View file

@ -61,11 +61,14 @@ void main(void) {
discard; discard;
} }
_fragColor = evalGlobalColor(1.0, vec4 color = evalGlobalColor(1.0,
fragPosition, fragPosition,
fragNormal, fragNormal,
fragDiffuse, fragDiffuse,
fragSpecular, fragSpecular,
fragGloss, fragGloss,
fragOpacity); fragOpacity);
// Apply standard tone mapping
_fragColor = vec4(pow(color.xyz, vec3(1.0 / 2.2)), color.w);
} }

View file

@ -58,11 +58,14 @@ void main(void) {
float fragGloss = 10.0 / 128.0; float fragGloss = 10.0 / 128.0;
float fragOpacity = diffuse.a * _alpha; float fragOpacity = diffuse.a * _alpha;
_fragColor = evalGlobalColor(1.0, vec4 color = evalGlobalColor(1.0,
fragPosition, fragPosition,
fragNormal, fragNormal,
fragDiffuse, fragDiffuse,
fragSpecular, fragSpecular,
fragGloss, fragGloss,
fragOpacity); fragOpacity);
// Apply standard tone mapping
_fragColor = vec4(pow(color.xyz, vec3(1.0 / 2.2)), color.w);
} }