Merge pull request #55983 from timothyqiu/auto-exposure-ivec2

This commit is contained in:
Rémi Verschelde 2021-12-16 11:18:31 +01:00 committed by GitHub
commit 3f137fb3a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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++) {