diff --git a/libs/ui/opengl/kis_opengl_canvas2.cpp b/libs/ui/opengl/kis_opengl_canvas2.cpp --- a/libs/ui/opengl/kis_opengl_canvas2.cpp +++ b/libs/ui/opengl/kis_opengl_canvas2.cpp @@ -566,7 +566,7 @@ qreal scaleX, scaleY; converter->imageScale(&scaleX, &scaleY); - d->displayShader->setUniformValue(d->displayShader->location(Uniform::ViewportScale), (GLfloat) scaleX); + d->displayShader->setUniformValue(d->displayShader->location(Uniform::ViewportScale), (GLfloat) (scaleX * devicePixelRatioF())); d->displayShader->setUniformValue(d->displayShader->location(Uniform::TexelSize), (GLfloat) d->openGLImageTextures->texelSize()); QRect ir = d->openGLImageTextures->storedImageBounds(); @@ -666,7 +666,7 @@ if (currentLodPlane > 0) { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); - } else if (SCALE_MORE_OR_EQUAL_TO(scaleX, scaleY, 2.0)) { + } else if (SCALE_MORE_OR_EQUAL_TO(scaleX * devicePixelRatioF(), scaleY * devicePixelRatioF(), 2.0)) { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); } else { @@ -684,7 +684,7 @@ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); break; case KisOpenGL::HighQualityFiltering: - if (SCALE_LESS_THAN(scaleX, scaleY, 0.5)) { + if (SCALE_LESS_THAN(scaleX * devicePixelRatioF(), scaleY * devicePixelRatioF(), 0.5)) { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST); } else { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);