From 5b4d6cca283ad97368f00a89277694ac617d6a53 Mon Sep 17 00:00:00 2001 From: yggdrasil75 Date: Thu, 4 Dec 2025 20:51:23 -0500 Subject: [PATCH] stupid mass replace got my file names --- util/grid/grid3.hpp | 13 ++++++++++--- util/noise/pnoise2.hpp | 2 +- util/output/bmpwriter.hpp | 2 +- util/ray3.hpp | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/util/grid/grid3.hpp b/util/grid/grid3.hpp index 992288b..0788956 100644 --- a/util/grid/grid3.hpp +++ b/util/grid/grid3.hpp @@ -2,7 +2,7 @@ #define GRID3_HPP #include -#include "../vectorlogic/Vec3.hpp" +#include "../vectorlogic/vec3.hpp" #include "../vectorlogic/vec4.hpp" #include "../timing_decorator.hpp" #include "../output/frame.hpp" @@ -350,13 +350,16 @@ public: << " max: " << maxChance << " gen colors: " << color << std::endl; std::vector poses; std::vector colors; + #pragma omp parallel for for (int x = min.x; x < max.x; x++) { + #pragma omp parallel for for (int y = min.y; y < max.y; y++) { + #pragma omp parallel for for (int z = min.z; z < max.z; z++) { float nx = (x+noisemod)/(max.x+EPSILON)/0.1; float ny = (y+noisemod)/(max.y+EPSILON)/0.1; float nz = (z+noisemod)/(max.z+EPSILON)/0.1; - Vec3f pos = Vec3f(nx,ny,nz); + Vec3 pos = Vec3f(nx,ny,nz); float alpha = noisegen.permute(pos); if (alpha > minChance && alpha < maxChance) { if (color) { @@ -364,14 +367,18 @@ public: float green = noisegen.permute(Vec3f(nx, ny, nz)*0.6); float blue = noisegen.permute(Vec3f(nx, ny, nz)*0.9); Vec4 newc = Vec4ui8(red,green,blue,1.0); + #pragma omp critical colors.push_back(newc); + #pragma omp critical poses.push_back(Vec3f(x,y,z)); } else { Vec4 newc = Vec4ui8(alpha,alpha,alpha,1.0); + #pragma omp critical colors.push_back(newc); + #pragma omp critical poses.push_back(Vec3f(x,y,z)); } - } + } } } } diff --git a/util/noise/pnoise2.hpp b/util/noise/pnoise2.hpp index d4de1fa..4bd8bd4 100644 --- a/util/noise/pnoise2.hpp +++ b/util/noise/pnoise2.hpp @@ -7,7 +7,7 @@ #include #include #include "../vectorlogic/vec2.hpp" -#include "../vectorlogic/Vec3.hpp" +#include "../vectorlogic/vec3.hpp" #include "../timing_decorator.hpp" class PNoise2 { diff --git a/util/output/bmpwriter.hpp b/util/output/bmpwriter.hpp index b3c2a0c..f1db6e6 100644 --- a/util/output/bmpwriter.hpp +++ b/util/output/bmpwriter.hpp @@ -7,7 +7,7 @@ #include #include #include -#include "../vectorlogic/Vec3.hpp" +#include "../vectorlogic/vec3.hpp" #include "frame.hpp" class BMPWriter { diff --git a/util/ray3.hpp b/util/ray3.hpp index 9ba2b6d..b15b4d8 100644 --- a/util/ray3.hpp +++ b/util/ray3.hpp @@ -1,7 +1,7 @@ #ifndef RAY3_HPP #define RAY3_HPP -#include "vectorlogic/Vec3.hpp" +#include "vectorlogic/vec3.hpp" template class Ray3 {