We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1dc55a8 commit 1064e94Copy full SHA for 1064e94
src/engine/renderer/glsl_source/cameraEffects_fp.glsl
@@ -136,15 +136,13 @@ void main()
136
{
137
float t = threshold - ( i * ( threshold / 10 ) );
138
139
- bvec3 cutoff = lessThan( mapped, vec3(t) );
140
-
141
- #if __VERSION__ > 120
142
- vec3 interpolation = vec3(0.5f) * vec3(cutoff);
143
- #else
144
- vec3 interpolation = 0.5f * cutoff;
145
- #endif
146
147
- mapped = mix( mapped, color.rgb, interpolation );
+ if ( ( color.r + color.g + color.b ) < ( 3 * threshold ) )
+ {
+ if ( ( mapped.r + mapped.g + mapped.b ) < ( 3 * threshold ) )
+ mapped = mix( mapped, color.rgb, 0.5f );
+ }
148
}
149
150
color.rgb = mapped;
0 commit comments