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.glsl10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gles3/shaders/tonemap.glsl b/drivers/gles3/shaders/tonemap.glsl
index 56876bdb72..e4aa8d5730 100644
--- a/drivers/gles3/shaders/tonemap.glsl
+++ b/drivers/gles3/shaders/tonemap.glsl
@@ -1,6 +1,8 @@
+/* clang-format off */
[vertex]
layout(location = 0) in highp vec4 vertex_attrib;
+/* clang-format on */
layout(location = 4) in vec2 uv_in;
out vec2 uv_interp;
@@ -15,11 +17,13 @@ void main() {
#endif
}
+/* clang-format off */
[fragment]
#if !defined(GLES_OVER_GL)
precision mediump float;
#endif
+/* clang-format on */
in vec2 uv_interp;
@@ -110,10 +114,8 @@ vec4 texture2D_bicubic(sampler2D tex, vec2 uv, int p_lod) {
vec2 p2 = (vec2(iuv.x + h0x, iuv.y + h1y) - vec2(0.5f)) * pixel_size;
vec2 p3 = (vec2(iuv.x + h1x, iuv.y + h1y) - vec2(0.5f)) * pixel_size;
- return g0(fuv.y) * (g0x * textureLod(tex, p0, lod) +
- g1x * textureLod(tex, p1, lod)) +
- g1(fuv.y) * (g0x * textureLod(tex, p2, lod) +
- g1x * textureLod(tex, p3, lod));
+ return (g0(fuv.y) * (g0x * textureLod(tex, p0, lod) + g1x * textureLod(tex, p1, lod))) +
+ (g1(fuv.y) * (g0x * textureLod(tex, p2, lod) + g1x * textureLod(tex, p3, lod)));
}
#define GLOW_TEXTURE_SAMPLE(m_tex, m_uv, m_lod) texture2D_bicubic(m_tex, m_uv, m_lod)