graphicsdriver/opengl: Bug fix: variables can be optimized out

This commit is contained in:
Hajime Hoshi 2018-12-23 06:04:35 +09:00
parent 189b8a17e9
commit 85df49dc96

View File

@ -157,6 +157,8 @@ void main(void) {
#if defined(FILTER_SCREEN) #if defined(FILTER_SCREEN)
highp vec2 p0 = pos - texel_size / 2.0 / scale; highp vec2 p0 = pos - texel_size / 2.0 / scale;
highp vec2 p1 = pos + texel_size / 2.0 / scale; highp vec2 p1 = pos + texel_size / 2.0 / scale;
// Prevent this variable from being optimized out.
p0 += varying_tex_region.xy - varying_tex_region.xy;
p1 = adjustTexel(p0, p1); p1 = adjustTexel(p0, p1);