summaryrefslogtreecommitdiff
path: root/drivers/gles3/shaders/tonemap.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles3/shaders/tonemap.glsl')
-rw-r--r--drivers/gles3/shaders/tonemap.glsl16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gles3/shaders/tonemap.glsl b/drivers/gles3/shaders/tonemap.glsl
index 8b3aa4d309..a478cf9170 100644
--- a/drivers/gles3/shaders/tonemap.glsl
+++ b/drivers/gles3/shaders/tonemap.glsl
@@ -10,9 +10,9 @@ precision highp float;
precision highp int;
#endif
-layout(location = 0) vec2 vertex_attrib;
+layout(location = 0) in vec2 vertex_attrib;
/* clang-format on */
-layout(location = 4) vec2 uv_in;
+layout(location = 4) in vec2 uv_in;
out vec2 uv_interp;
@@ -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;
}