diff --git a/resources/shaders/glsl/opacity.glsl b/resources/shaders/glsl/opacity.glsl index a63dda14f..5e71d3b34 100644 --- a/resources/shaders/glsl/opacity.glsl +++ b/resources/shaders/glsl/opacity.glsl @@ -28,9 +28,8 @@ varying vec2 vTexCoord; void main() { vec4 color = texture2D(myTexture, vTexCoord); - float alpha = clamp(color.a-(1-opacity), 0.0, 1.0); - gl_FragColor = vec4(color.rgb, alpha); + gl_FragColor = vec4(color.rgb, color.a * opacity); } #endif