fix(render): remove duplicate scaling in render_image model matrix

This commit is contained in:
2026-07-13 13:10:44 +08:00
parent e8157ab549
commit 0cbb353a2a

View File

@@ -193,8 +193,7 @@ void Renderer::render_image(const Image& image) {
glm::mat4 model_matrix = glm::mat4 model_matrix =
glm::translate(glm::mat4(1.0f), glm::vec3(pos.x, pos.y, 0.0f)) * glm::translate(glm::mat4(1.0f), glm::vec3(pos.x, pos.y, 0.0f)) *
glm::scale(glm::mat4(1.0f), glm::scale(glm::mat4(1.0f),
glm::vec3(image.width() * image.scale(), glm::vec3(image.width(), image.height(), 1.0f));
image.height() * image.scale(), 1.0f));
shader.set_loc("model_matrix", model_matrix); shader.set_loc("model_matrix", model_matrix);
shader.set_loc("proj_matrix", m_ui_proj_matrix); shader.set_loc("proj_matrix", m_ui_proj_matrix);