From 65112ea4c32278989556ddfd40523176d929b74f Mon Sep 17 00:00:00 2001 From: Pascal Engeler <engelerp@phys.ethz.ch> Date: Sun, 29 May 2022 18:57:54 +0200 Subject: [PATCH] absorbed scaling into model transformation --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 84c4d74..14c3938 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -92,8 +92,10 @@ int main(int argc, char** argv) { /*Update projection, view, model*/ glm::mat4 projection = glm::perspective(glm::radians(45.f), static_cast<float>(WIDTH) / static_cast<float>(HEIGHT), 0.1f, 100.0f); glm::mat4 view = camera.GetViewMatrix(); + //model specific + float scale = 0.5; glm::vec3 pos(-0.5, -0.5, 0); - glm::mat4 model = glm::translate(glm::mat4(1.0f), pos); + glm::mat4 model = glm::translate(scale_z(heightmap->minZ(), scale), pos); /*Check if we want to get the height*/ -- GitLab