mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-03 09:01:09 +02:00
Add tone mapping to overlay shaders
This commit is contained in:
parent
a1ed29e6f8
commit
b0a9c299ed
2 changed files with 8 additions and 2 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue