From 482362951091f8b97dc516a5ac9c5a6ba58fe81c Mon Sep 17 00:00:00 2001 From: dompia5 Date: Wed, 7 Feb 2024 22:09:59 +0100 Subject: [PATCH] scale fixed. --- PlanetCreator/cw 6/src/ex_6_1.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PlanetCreator/cw 6/src/ex_6_1.hpp b/PlanetCreator/cw 6/src/ex_6_1.hpp index 6019e0a..1e615c5 100644 --- a/PlanetCreator/cw 6/src/ex_6_1.hpp +++ b/PlanetCreator/cw 6/src/ex_6_1.hpp @@ -155,7 +155,7 @@ bool sortFunction(std::tuple objA, std::tuple objB) PlanetParams populatePlanet(PlanetParams planet, std::vector plants) { float probability=0.5f; - int HOW_MANY_PLANTS = 100; + int HOW_MANY_PLANTS = 1000; int PRECISION = 10000; float NOTHING_SPAWNS_CUTOFF = 0.0; int sum = 0; @@ -320,7 +320,7 @@ glm::mat4 createPerspectiveMatrix() glm::mat4 perspectiveMatrix; float n = 0.05; - float f = 100.; + float f = 300.; float a1 = glm::min(aspectRatio, 1.f); float a2 = glm::min(1 / aspectRatio, 1.f); perspectiveMatrix = glm::mat4({ @@ -435,8 +435,8 @@ void drawObjectTexture_plantInstanced(Core::RenderContext& context, std::vector< void placeObjectOnPlanet(Core::RenderContext& objectContext, glm::mat4 objectMatrix,float scale,std::vectorplacePoints, PlanetParams planetParams,int count) { float planetScale = planetParams.size; - glm::mat4 savedobjectMatrix=objectMatrix; - objectMatrix = glm::scale(objectMatrix, glm::vec3(scale)); + glm::mat4 savedobjectMatrix; + savedobjectMatrix = glm::scale(objectMatrix, glm::vec3(scale)); float diameter = 24.4 * planetScale; glm::vec3 base = glm::vec3(0.f, 1.f, 0.f); glm::vec3 axis;