Fix incompatible addition in auto exposure shader

This commit is contained in:
Haoyu Qiu 2021-12-16 16:02:29 +08:00
parent b8f87d3f86
commit e614a0e9fc

View file

@ -39,7 +39,7 @@ void main() {
#if 1 #if 1
//more precise and expensive, but less jittery //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 next_pos = max(next_pos, src_pos + ivec2(1)); //so it at least reads one pixel
highp vec3 source_color = vec3(0.0); highp vec3 source_color = vec3(0.0);
for (int i = src_pos.x; i < next_pos.x; i++) { for (int i = src_pos.x; i < next_pos.x; i++) {