mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-27 18:48:36 +02:00
~ | dfghjkl
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: ycontre <ycontre@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/09/27 14:51:49 by TheRed #+# #+# */
|
||||
/* Updated: 2025/01/18 21:10:23 by ycontre ### ########.fr */
|
||||
/* Updated: 2025/01/19 19:05:44 by ycontre ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: ycontre <ycontre@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/01/16 21:48:48 by TheRed #+# #+# */
|
||||
/* Updated: 2025/01/18 21:11:35 by ycontre ### ########.fr */
|
||||
/* Updated: 2025/01/19 18:30:27 by ycontre ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -53,7 +53,7 @@ float BVH::evaluateSah(std::vector<GPUTriangle> &primitives, int axis, float pos
|
||||
int left_count = 0;
|
||||
int right_count = 0;
|
||||
|
||||
for (unsigned int i = 0; i < _primitive_count; i++)
|
||||
for (int i = 0; i < _primitive_count; i++)
|
||||
{
|
||||
GPUTriangle triangle = primitives[_first_primitive + i];
|
||||
glm::vec3 centroid = (triangle.position + triangle.vertex1 + triangle.vertex2) / 3.0f;
|
||||
@ -84,8 +84,6 @@ void BVH::subdivide(std::vector<GPUTriangle> &primitives)
|
||||
if (_primitive_count <= 4)
|
||||
return ;
|
||||
|
||||
glm::vec3 extent = _aabb.max - _aabb.min;
|
||||
|
||||
const int num_test_per_axis = 5;
|
||||
|
||||
int best_axis = 0;
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: ycontre <ycontre@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/10/13 20:21:13 by ycontre #+# #+# */
|
||||
/* Updated: 2025/01/18 19:08:58 by ycontre ### ########.fr */
|
||||
/* Updated: 2025/01/19 18:58:42 by ycontre ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -67,7 +67,7 @@ Shader::Shader(std::string vertexPath, std::string fragmentPath, std::string com
|
||||
const char *fragmentCode = loadFileWithIncludes(fragmentPath);
|
||||
const char *computeCode = loadFileWithIncludes(computePath);
|
||||
|
||||
// printWithLineNumbers(computeCode);
|
||||
printWithLineNumbers(computeCode);
|
||||
|
||||
_vertex = glCreateShader(GL_VERTEX_SHADER);
|
||||
|
||||
|
Reference in New Issue
Block a user