+ | Some opti

This commit is contained in:
RedShip
2025-01-23 19:44:55 +01:00
parent 896cd02e45
commit c050caa789
12 changed files with 39 additions and 197 deletions

View File

@ -6,7 +6,7 @@
/* By: ycontre <ycontre@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/01/16 21:48:48 by TheRed #+# #+# */
/* Updated: 2025/01/19 18:30:27 by ycontre ### ########.fr */
/* Updated: 2025/01/23 18:30:20 by ycontre ### ########.fr */
/* */
/* ************************************************************************** */

View File

@ -6,7 +6,7 @@
/* By: ycontre <ycontre@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/12/23 18:29:41 by ycontre #+# #+# */
/* Updated: 2025/01/21 14:45:04 by tomoron ### ########.fr */
/* Updated: 2025/01/23 18:31:52 by ycontre ### ########.fr */
/* */
/* ************************************************************************** */
@ -155,6 +155,7 @@ void Scene::addBvh(std::vector<Triangle> &triangles, glm::vec3 offset, float sc
new_bvhs_list = bvh->getGPUBvhs();
new_bvh_data.transform = transform * scale;
new_bvh_data.inv_transform = glm::inverse(new_bvh_data.transform);
new_bvh_data.offset = offset;
new_bvh_data.scale = scale;
new_bvh_data.bvh_start_index = _gpu_bvh.size();

View File

@ -6,7 +6,7 @@
/* By: ycontre <ycontre@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/13 20:21:13 by ycontre #+# #+# */
/* Updated: 2025/01/19 18:58:42 by ycontre ### ########.fr */
/* Updated: 2025/01/23 18:46:34 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);