diff --git a/08-colors-basic-light/assets/popcorn_model_a.glb b/08-colors-basic-light/assets/popcorn_model_a.glb index ae67d15..dc02c85 100644 Binary files a/08-colors-basic-light/assets/popcorn_model_a.glb and b/08-colors-basic-light/assets/popcorn_model_a.glb differ diff --git a/08-colors-basic-light/assets/popcorn_model_a_bad_normals.glb b/08-colors-basic-light/assets/popcorn_model_a_bad_normals.glb new file mode 100644 index 0000000..ae67d15 Binary files /dev/null and b/08-colors-basic-light/assets/popcorn_model_a_bad_normals.glb differ diff --git a/08-colors-basic-light/src/main.cpp b/08-colors-basic-light/src/main.cpp index 62be021..59b3a84 100644 --- a/08-colors-basic-light/src/main.cpp +++ b/08-colors-basic-light/src/main.cpp @@ -21,6 +21,7 @@ void processInput(GLFWwindow *window); const unsigned int SCR_WIDTH = 800; const unsigned int SCR_HEIGHT = 600; +const glm::vec3 POPCORN_SCALE{1.0f, 1.0f, 1.0f}; struct Config { Shader shader; @@ -239,7 +240,7 @@ void render(GLFWwindow* window, Config& config, BoxTest& box, b2World& world) { model = glm::rotate(model, angle / 5.0f, glm::vec3(1.0f, 0.0f, 0.0f)); model = glm::rotate(model, glm::radians(time * 10.0f), glm::vec3(0.0f, 1.0f, 1.0f)); - model = glm::scale(model, glm::vec3(0.5f, 0.5f, 0.5f)); // it's a bit too big for our scene, so scale it down + model = glm::scale(model, POPCORN_SCALE); // it's a bit too big for our scene, so scale it down config.shader.setMat4("model", model); config.model.Draw(config.shader);