summaryrefslogtreecommitdiff
path: root/drivers/gles3
diff options
context:
space:
mode:
authorYuri Rubinsky <chaosus89@gmail.com>2022-05-17 10:55:50 +0300
committerYuri Rubinsky <chaosus89@gmail.com>2022-05-18 06:43:07 +0300
commit5322b171de1dedc8780180e9026e115afd2abaef (patch)
treef35a1510ecfff8a7eeada21052451c6f55b22c76 /drivers/gles3
parent5631b59e218f4883442382c097eed10ed76b3c8d (diff)
Fix tonemapper shader to correctly apply alpha channel
Diffstat (limited to 'drivers/gles3')
-rw-r--r--drivers/gles3/shaders/tonemap.glsl12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gles3/shaders/tonemap.glsl b/drivers/gles3/shaders/tonemap.glsl
index 4f962626a3..a478cf9170 100644
--- a/drivers/gles3/shaders/tonemap.glsl
+++ b/drivers/gles3/shaders/tonemap.glsl
@@ -231,10 +231,10 @@ vec3 apply_fxaa(vec3 color, vec2 uv_interp, vec2 pixel_size) {
}
void main() {
- vec3 color = textureLod(source, uv_interp, 0.0).rgb;
+ vec4 color = textureLod(source, uv_interp, 0.0);
#ifdef USE_FXAA
- color = apply_fxaa(color, uv_interp, pixel_size);
+ color.rgb = apply_fxaa(color.rgb, uv_interp, pixel_size);
#endif
// Glow
@@ -296,18 +296,18 @@ void main() {
#endif //USE_MULTI_TEXTURE_GLOW
glow *= glow_intensity;
- color = apply_glow(color, glow);
+ color.rgb = apply_glow(color.rgb, glow);
#endif
// Additional effects
#ifdef USE_BCS
- color = apply_bcs(color, bcs);
+ color.rgb = apply_bcs(color.rgb, bcs);
#endif
#ifdef USE_COLOR_CORRECTION
- color = apply_color_correction(color, color_correction);
+ color.rgb = apply_color_correction(color.rgb, color_correction);
#endif
- frag_color = vec4(color, 1.0);
+ frag_color = color;
}