summaryrefslogtreecommitdiff
path: root/drivers/gles3/shaders
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-05-07 09:24:39 -0300
committerGitHub <noreply@github.com>2018-05-07 09:24:39 -0300
commit38aaf78325b9507d825f067f85ce551ebc5cb850 (patch)
treef7a03719ff4aee9359a2b2fa4f27bdd0a791e6da /drivers/gles3/shaders
parent9aa9dd27fef7aeea92cf5bbec771f7d6f47caf82 (diff)
parent6f7fefa489bb303301850befc9ea8eb573d33774 (diff)
Merge pull request #18524 from BastiaanOlij/keep_3d_linear
Added option to viewport to keep linear color
Diffstat (limited to 'drivers/gles3/shaders')
-rw-r--r--drivers/gles3/shaders/tonemap.glsl4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gles3/shaders/tonemap.glsl b/drivers/gles3/shaders/tonemap.glsl
index 2f671158b2..a75871f08e 100644
--- a/drivers/gles3/shaders/tonemap.glsl
+++ b/drivers/gles3/shaders/tonemap.glsl
@@ -258,9 +258,13 @@ void main() {
#endif
+#ifdef KEEP_3D_LINEAR
+ // leave color as is...
+#else
//regular Linear -> SRGB conversion
vec3 a = vec3(0.055);
color.rgb = mix( (vec3(1.0)+a)*pow(color.rgb,vec3(1.0/2.4))-a , 12.92*color.rgb , lessThan(color.rgb,vec3(0.0031308)));
+#endif
#if defined(USING_GLOW)
glow = mix( (vec3(1.0)+a)*pow(glow,vec3(1.0/2.4))-a , 12.92*glow , lessThan(glow,vec3(0.0031308)));