mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-27 10:48:34 +02:00
+ Done
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
CAM 1.82501 0.45 0 -10 180 0.005 2.164 35 5
|
||||
CAM 1.99 0.45 0 -10 180 0.005 2.164 35 5
|
||||
|
||||
|
||||
MAT 255 255 255 0.0 1. 0.3 // white 0
|
||||
@ -24,8 +24,9 @@ pl 0 -2 0 0 1 0 2 // floor
|
||||
|
||||
qu -1 1.999 -1 2 0 0 0 0 2 6
|
||||
|
||||
OBJ obj/Dragon_80K.obj -0.5 0 0.55 1 0 90 0
|
||||
OBJ obj/Dragon_80K.obj 0.5 0 -0.55 1 0 -90 0
|
||||
OBJ obj/Dragon_800K.obj -0.5 0 0.55 5 0 90 0
|
||||
OBJ obj/Dragon_800K.obj 0.5 0 -0.55 5 0 -90 0
|
||||
|
||||
|
||||
# OBJ obj/Model.obj
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
CAM -0.75 1.3 -1. -15 50 0.005 2 45 5
|
||||
# CAM -0.75 1.3 -1. -15 50 0.005 2 45 5
|
||||
CAM -0.75 30 -1. -15 50 0.005 2 45 5
|
||||
|
||||
MAT 255 255 255 0.0 1. 0.3 // white 0
|
||||
|
||||
|
@ -156,24 +156,6 @@ hitInfo traceTopBVH(Ray ray)
|
||||
hit.t = 1e30;
|
||||
hit.obj_index = -1;
|
||||
|
||||
//this is working
|
||||
// for (int i = 0; i < u_bvhNum; i++)
|
||||
// {
|
||||
// hit_bvh = traverseBVHs(ray, BvhData[i]);
|
||||
// if (hit_bvh.t < hit.t)
|
||||
// {
|
||||
// hit.t = hit_bvh.t;
|
||||
// hit.last_t = hit_bvh.last_t;
|
||||
// hit.obj_index = hit_bvh.obj_index;
|
||||
// hit.mat_index = hit_bvh.mat_index;
|
||||
// hit.position = hit_bvh.position;
|
||||
// hit.normal = hit_bvh.normal;
|
||||
// }
|
||||
// }
|
||||
|
||||
// return (hit);
|
||||
//
|
||||
|
||||
int stack[32];
|
||||
int stack_ptr = 0;
|
||||
stack[0] = 0;
|
||||
@ -244,7 +226,7 @@ hitInfo traceRay(Ray ray)
|
||||
hitScene = traceScene(ray);
|
||||
|
||||
hit = hitBVH.t < hitScene.t ? hitBVH : hitScene;
|
||||
#if 0
|
||||
#if 1
|
||||
if (hit.obj_index == -1 || objects[hit.obj_index].type != 5)
|
||||
break ;
|
||||
ray = portalRay(ray, hit);
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user