From e614a0e9fcaff50c6adc24c5668b96732bc5d89f Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Thu, 16 Dec 2021 16:02:29 +0800 Subject: [PATCH] Fix incompatible addition in auto exposure shader --- drivers/gles3/shaders/exposure.glsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gles3/shaders/exposure.glsl b/drivers/gles3/shaders/exposure.glsl index c20812bfa3b..dc5a64e722b 100644 --- a/drivers/gles3/shaders/exposure.glsl +++ b/drivers/gles3/shaders/exposure.glsl @@ -39,7 +39,7 @@ void main() { #if 1 //more precise and expensive, but less jittery - ivec2 next_pos = ivec2(gl_FragCoord.xy + ivec2(1)) * source_render_size / target_size; + ivec2 next_pos = (ivec2(gl_FragCoord.xy) + ivec2(1)) * source_render_size / target_size; next_pos = max(next_pos, src_pos + ivec2(1)); //so it at least reads one pixel highp vec3 source_color = vec3(0.0); for (int i = src_pos.x; i < next_pos.x; i++) {