mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
fix(render): remove duplicate scaling in render_image model matrix
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user