mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-28 02:58:35 +02:00
~ | Working Toplevel bvh for untransformed obj
This commit is contained in:
@ -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);
|
||||
|
@ -33,8 +33,8 @@ void TopBVH::updateBounds(std::vector<GPUBvhData> &bvhs_data, std::vector<GPUBvh
|
||||
GPUBvhData bvh_data = bvhs_data[_first_bvh + i];
|
||||
GPUBvh root_bvh = bvhs[bvh_data.bvh_start_index];
|
||||
|
||||
glm::vec3 min = root_bvh.min - bvh_data.offset;
|
||||
glm::vec3 max = root_bvh.max - bvh_data.offset;
|
||||
glm::vec3 min = root_bvh.min + bvh_data.offset;
|
||||
glm::vec3 max = root_bvh.max + bvh_data.offset;
|
||||
|
||||
_aabb.min = glm::min(_aabb.min, min);
|
||||
_aabb.max = glm::max(_aabb.max, max);
|
||||
|
Reference in New Issue
Block a user