diff --git a/projects/wobble_bobble/shaders/grid.frag b/projects/wobble_bobble/shaders/grid.frag new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/projects/wobble_bobble/shaders/grid.vert b/projects/wobble_bobble/shaders/grid.vert new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/projects/wobble_bobble/src/main.cpp b/projects/wobble_bobble/src/main.cpp index a9df518714ecedb2a0ad2f87b0262f10a8b634c1..dae4ecdb16dc525586ce59bed0228ec619acc785 100644 --- a/projects/wobble_bobble/src/main.cpp +++ b/projects/wobble_bobble/src/main.cpp @@ -4,6 +4,8 @@ #include <vkcv/gui/GUI.hpp> #include <vkcv/shader/GLSLCompiler.hpp> +#include <random> + struct Particle { glm::vec3 position; float size; @@ -12,8 +14,11 @@ struct Particle { glm::mat4 deformation; }; +std::random_device random_dev; +std::uniform_int_distribution<int> dist(0, RAND_MAX); + float randomFloat(float min, float max) { - return min + (max - min) * static_cast<float>(rand()) / static_cast<float>(RAND_MAX); + return min + (max - min) * dist(random_dev) / static_cast<float>(RAND_MAX); } void distributeParticles(Particle *particles, size_t count, const glm::vec3& center, float radius, float mass) {