+ | bvh opti

This commit is contained in:
RedShip
2025-01-18 19:41:29 +01:00
parent 0df32ce16d
commit 146381f191
5 changed files with 2814 additions and 1746 deletions

4547
fps.txt

File diff suppressed because it is too large Load Diff

View File

@ -18,10 +18,12 @@ pl 0 0 -2 0 0 1 1 // back wall
pl 0 0 2 0 0 -1 5 // front wall
pl 2 0 0 -1 0 0 3 // right wall
pl -2 0 0 1 0 0 2 // left wall
# pl 0 2 0 0 -1 0 0 // ceiling
pl 0 2 0 0 -1 0 0 // ceiling
pl 0 -2 0 0 1 0 2 // floor
qu -1 1.999 -1 2 0 0 0 0 2 6
# sp 1 1 0 0.5 6
OBJ obj/Dragon_80K.obj

View File

@ -2,6 +2,7 @@ hitInfo traceRay(Ray ray);
vec3 GetEnvironmentLight(Ray ray)
{
return vec3(0.);
vec3 sun_pos = vec3(-0.5, 0.5, 0.5);
float SunFocus = 1.5;
float SunIntensity = 1.;

View File

@ -6,7 +6,7 @@
/* By: ycontre <ycontre@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/09/27 14:51:49 by TheRed #+# #+# */
/* Updated: 2025/01/18 19:21:00 by ycontre ### ########.fr */
/* Updated: 2025/01/18 19:28:58 by ycontre ### ########.fr */
/* */
/* ************************************************************************** */
@ -20,8 +20,8 @@ int main(int argc, char **argv)
return (1);
Window window(&scene, WIDTH, HEIGHT, "RT_GPU", 0);
// Shader shader("shaders/vertex.vert", "shaders/frag.frag", "shaders/compute.glsl");
Shader shader("shaders/vertex.vert", "shaders/frag.frag", "shaders/debug.glsl");
Shader shader("shaders/vertex.vert", "shaders/frag.frag", "shaders/compute.glsl");
// Shader shader("shaders/vertex.vert", "shaders/frag.frag", "shaders/debug.glsl");
GLint max_gpu_size;
glGetIntegerv(GL_MAX_SHADER_STORAGE_BLOCK_SIZE, &max_gpu_size);

View File

@ -6,7 +6,7 @@
/* By: ycontre <ycontre@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/13 16:16:24 by TheRed #+# #+# */
/* Updated: 2025/01/18 19:22:30 by ycontre ### ########.fr */
/* Updated: 2025/01/18 19:24:04 by ycontre ### ########.fr */
/* */
/* ************************************************************************** */