diff --git a/include/render_params.h b/include/render_params.h index ea72807..ff6f98f 100644 --- a/include/render_params.h +++ b/include/render_params.h @@ -13,7 +13,7 @@ namespace rt m::u64vec2 tileSize; float mixingFactor = 1.88f; - int recursionDeph = 3; + int recursionDepth = 3; std::optional logPixel; diff --git a/include/rtmath.h b/include/rtmath.h index 9143975..8072fde 100644 --- a/include/rtmath.h +++ b/include/rtmath.h @@ -67,7 +67,7 @@ namespace rt return n; } - // Only works with matricies, that are not effecting the w component of a vector. + // Only works with matrices, that are not effecting the w component of a vector. // If you matrix does not fit this restriction, use ray.transformPerspective(mat4) instead. ray &operator*=(const mat4 &matrix) { @@ -89,7 +89,7 @@ namespace rt } }; - // Only works with matricies, that are not effecting the w component of a vector. + // Only works with matrices, that are not effecting the w component of a vector. // If you matrix does not fit this restriction, use ray.transformPerspective(mat4) instead. template ray operator*(const mat4 &matrix, const ray &ray) diff --git a/include/stream_formatter.h b/include/stream_formatter.h index be7366e..5c2c318 100644 --- a/include/stream_formatter.h +++ b/include/stream_formatter.h @@ -16,7 +16,7 @@ namespace rtstd char_type indent = (char_type)' '; char_type openingBracket = (char_type)'{'; char_type closingBracket = (char_type)'}'; - char_type seperator = (char_type)','; + char_type separator = (char_type)','; char_type deactivator = (char_type)'('; char_type activator = (char_type)')'; char_type lineBreak = (char_type)'\n'; @@ -127,7 +127,7 @@ namespace rtstd m_outStream << ch; return ch; } - else if (ch == m_args.seperator) + else if (ch == m_args.separator) { m_outStream << ch; breakLine(); diff --git a/src/gl_error.cpp b/src/gl_error.cpp index ddbcbd1..35e3d69 100644 --- a/src/gl_error.cpp +++ b/src/gl_error.cpp @@ -8,7 +8,7 @@ namespace rt { while (GLenum error = glGetError()) { - std::cout << "Error: Uncought OpenGL error (" << error << ")\n" + std::cout << "Error: Uncaught OpenGL error (" << error << ")\n" << file << ":" << line << "\n\tat: " << statement << "\n\tat: " << function << "\n"; } } diff --git a/src/material.cpp b/src/material.cpp index c65da2c..c8f3bc6 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -46,7 +46,7 @@ namespace rt m::dvec3 normal = glm::normalize(normal_); m::dvec3 hitDirection = glm::normalize(hitDirection_); - Color e_ambiant = Color(ambient); + Color e_ambient = Color(ambient); Color e_reflection(0); if (recursionDepth > 0) @@ -67,7 +67,7 @@ namespace rt i_Lights.push_back(light.get()); } - Color result = e_ambiant; + Color result = e_ambient; for (auto &&i_light : i_Lights) { Color lightColor = i_light->getColor(position); diff --git a/src/profiler.cpp b/src/profiler.cpp index 80e52ca..a76a40a 100644 --- a/src/profiler.cpp +++ b/src/profiler.cpp @@ -126,10 +126,10 @@ namespace rtImGui auto darkened = col; - const float drarkenFact = 0.8f; - darkened.Value.x *= drarkenFact; - darkened.Value.y *= drarkenFact; - darkened.Value.z *= drarkenFact; + const float darkenFact = 0.8f; + darkened.Value.x *= darkenFact; + darkened.Value.y *= darkenFact; + darkened.Value.z *= darkenFact; drawList->AddRectFilled(rect.Min, rect.Max, col, 2); drawList->AddRect(rect.Min, rect.Max, darkened, 2); diff --git a/src/resource_loaders.cpp b/src/resource_loaders.cpp index c15716d..82432dc 100644 --- a/src/resource_loaders.cpp +++ b/src/resource_loaders.cpp @@ -17,7 +17,7 @@ namespace rt return buf; } - struct Chunck + struct Chunk { union { @@ -33,9 +33,9 @@ namespace rt return *(int32_t *)str; } - inline Chunck readChunk(std::ifstream &stream) + inline Chunk readChunk(std::ifstream &stream) { - Chunck chunk; + Chunk chunk; stream.read(chunk.name, sizeof(chunk.name)); stream.read((char *)&chunk.contentSize, sizeof(chunk.contentSize)); stream.read((char *)&chunk.childrenSize, sizeof(chunk.childrenSize)); @@ -58,11 +58,11 @@ namespace rt if (version != 150) throw IOException(IOException::Type::WrongType, "File version differs from expected, 150 expected, got: " + version); - Chunck main = readChunk(file); + Chunk main = readChunk(file); if (main.nameAsInt != asInt("MAIN")) throw IOException(IOException::Type::FileCorrupt, "File has wrong format!"); - Chunck sizeChunk = readChunk(file); + Chunk sizeChunk = readChunk(file); if (sizeChunk.nameAsInt == asInt("PACK")) throw IOException(IOException::Type::WrongType, "Multiple models are not supported!"); if (sizeChunk.nameAsInt != asInt("SIZE")) @@ -76,7 +76,7 @@ namespace rt VoxelGrid grid(size); - Chunck xyziChunk = readChunk(file); + Chunk xyziChunk = readChunk(file); if (xyziChunk.nameAsInt != asInt("XYZI")) throw IOException(IOException::Type::FileCorrupt, "File has wrong format!"); diff --git a/src/rt_renderer.cpp b/src/rt_renderer.cpp index ea7dc2c..8b285e7 100644 --- a/src/rt_renderer.cpp +++ b/src/rt_renderer.cpp @@ -23,7 +23,7 @@ namespace rt // Ray is in world space now ray = ray.transformPerspective(invCam); - auto color = castPropagationRay(ray, renderParams->recursionDeph); + auto color = castPropagationRay(ray, renderParams->recursionDepth); // Tone mapping switch (renderParams->toneMappingAlgorithm) @@ -57,7 +57,7 @@ namespace rt } auto &intersection = maybeIntersection.value(); - PIXEL_LOGGER_LOG("Intesected: ", intersection.object->name); + PIXEL_LOGGER_LOG("Intersected: ", intersection.object->name); Material *material = scene->getMaterial(intersection.object->materialIndex); if (material == nullptr) diff --git a/src/window_thread.cpp b/src/window_thread.cpp index 2db86b9..7399ea8 100644 --- a/src/window_thread.cpp +++ b/src/window_thread.cpp @@ -218,7 +218,7 @@ namespace rt GLCALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER)); GLCALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER)); - // std::array vertecies[] = { + // std::array vertices[] = { // {1.0, 1.0, 0.0}, // {1.0, -1.0, 0.0}, // {-1.0, -1.0, 0.0}, @@ -231,7 +231,7 @@ namespace rt // GLCALL(glGenBuffers(1, &quadBuffer)); // GLCALL(glBindBuffer(GL_ARRAY_BUFFER, quadBuffer)); - // GLCALL(glBufferData(GL_ARRAY_BUFFER, 6 * 3 * sizeof(float), vertecies, GL_STATIC_DRAW)); + // GLCALL(glBufferData(GL_ARRAY_BUFFER, 6 * 3 * sizeof(float), vertices, GL_STATIC_DRAW)); // GLCALL(glEnableVertexAttribArray(0)); // GLCALL(glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(float), nullptr));