From 6f7fefa489bb303301850befc9ea8eb573d33774 Mon Sep 17 00:00:00 2001 From: Bastiaan Olij Date: Mon, 30 Apr 2018 22:30:11 +1000 Subject: Added option to viewport to keep linear color --- drivers/gles3/shaders/tonemap.glsl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/gles3/shaders') 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))); -- cgit v1.2.3