diff --git a/es-core/src/components/ButtonComponent.cpp b/es-core/src/components/ButtonComponent.cpp index 00147f2f3..658263210 100644 --- a/es-core/src/components/ButtonComponent.cpp +++ b/es-core/src/components/ButtonComponent.cpp @@ -133,6 +133,7 @@ void ButtonComponent::render(const glm::mat4& parentTrans) glm::vec3 centerOffset {(mSize.x - mTextCache->metrics.size.x) / 2.0f, (mSize.y - mTextCache->metrics.size.y) / 2.0f, 0.0f}; trans = glm::translate(trans, centerOffset); + trans[3] = glm::round(trans[3]); if (Settings::getInstance()->getBool("DebugText")) { mRenderer->drawRect(centerOffset.x, 0.0f, mTextCache->metrics.size.x, mSize.y, diff --git a/es-core/src/components/NinePatchComponent.cpp b/es-core/src/components/NinePatchComponent.cpp index 582c37bf8..2e0dcdc64 100644 --- a/es-core/src/components/NinePatchComponent.cpp +++ b/es-core/src/components/NinePatchComponent.cpp @@ -132,6 +132,7 @@ void NinePatchComponent::render(const glm::mat4& parentTrans) glm::mat4 trans {parentTrans * getTransform()}; if (mTexture && mVertices != nullptr) { + trans[3] = glm::round(trans[3]); mRenderer->setMatrix(trans); mVertices->opacity = mOpacity; mTexture->bind();