From acf0ac909f663e670ec60ab20f0726367feca53e Mon Sep 17 00:00:00 2001 From: Benau Date: Wed, 30 Nov 2016 15:00:08 +0800 Subject: [PATCH] And a correct ifdef for bindless texture --- data/shaders/transparent.frag | 2 ++ data/shaders/transparentfog.frag | 2 ++ data/shaders/volumetriclight.frag | 2 ++ 3 files changed, 6 insertions(+) diff --git a/data/shaders/transparent.frag b/data/shaders/transparent.frag index 03250aa21..67b6733de 100644 --- a/data/shaders/transparent.frag +++ b/data/shaders/transparent.frag @@ -14,7 +14,9 @@ void main() { vec4 Color = texture(tex, uv); #ifdef Use_Bindless_Texture +#ifdef SRGBBindlessFix Color.xyz = pow(Color.xyz, vec3(2.2)); +#endif #endif Color.xyz *= pow(color.xyz, vec3(2.2)); Color.a *= color.a; diff --git a/data/shaders/transparentfog.frag b/data/shaders/transparentfog.frag index d960f07e1..0f1c74dff 100644 --- a/data/shaders/transparentfog.frag +++ b/data/shaders/transparentfog.frag @@ -21,7 +21,9 @@ void main() { vec4 diffusecolor = texture(tex, uv); #ifdef Use_Bindless_Texture +#ifdef SRGBBindlessFix diffusecolor.xyz = pow(diffusecolor.xyz, vec3(2.2)); +#endif #endif diffusecolor.xyz *= pow(color.xyz, vec3(2.2)); diffusecolor.a *= color.a; diff --git a/data/shaders/volumetriclight.frag b/data/shaders/volumetriclight.frag index 1a7be4943..e6e303753 100644 --- a/data/shaders/volumetriclight.frag +++ b/data/shaders/volumetriclight.frag @@ -21,7 +21,9 @@ void main() { vec4 diffusecolor = texture(tex, uv); #ifdef Use_Bindless_Texture +#ifdef SRGBBindlessFix diffusecolor.xyz = pow(diffusecolor.xyz, vec3(2.2)); +#endif #endif diffusecolor.xyz *= pow(color.xyz, vec3(2.2)); diffusecolor.a *= color.a;