+ | New topbvh stats

This commit is contained in:
TheRedShip
2025-01-23 15:57:07 +01:00
parent 1f23592883
commit 141eb369f9
3 changed files with 1124 additions and 1131 deletions

View File

@ -19,6 +19,13 @@ struct GPUBvhData;
struct GPUTopBvh;
struct AABB;
struct TopBVHStats
{
int min_bvh;
int max_bvh;
float average_bvh;
};
class TopBVH
{
public:
@ -30,16 +37,12 @@ class TopBVH
float evaluateSah(std::vector<GPUBvhData> &bvhs_data, std::vector<GPUBvh> &bvhs, int axis, float pos);
int getSize();
// int getLeaves();
int getLeaves();
// void flatten(std::vector<GPUTopBvh> &TopBVHs, int &currentIndex);
// GPUTopBvh toGPUTopBvh();
std::vector<GPUTopBvh> getGPUTopBvhs();
void flatten(std::vector<GPUTopBvh> &top_bvhs, int &currentIndex);
// const AABB &getAABB() const;
// std::vector<GPUTopBvh> getGPUTopBvhs();
TopBVHStats analyzeBVHLeaves();
private:
AABB _aabb;

View File

@ -24,18 +24,8 @@ pl 0 -2 0 0 1 0 2 // floor
qu -1 1.999 -1 2 0 0 0 0 2 6
OBJ scenes/obj/Dragon_80K.obj -0.5 0 0.55 5 0 0 0
OBJ scenes/obj/Dragon_80K.obj 0.5 0 -0.55 1 0 0 0
OBJ scenes/obj/Dragon_80K.obj -1.5 0 1.5 1 0 0 0
OBJ scenes/obj/Dragon_80K.obj 1.5 0 -1.5 1 0 0 0
OBJ scenes/obj/Dragon_80K.obj -0.5 1 0.55 1 0 0 0
OBJ scenes/obj/Dragon_80K.obj 0.5 1 -0.55 1 0 0 0
OBJ scenes/obj/Dragon_80K.obj -3.5 3 3.5 1 0 0 0
OBJ scenes/obj/Dragon_80K.obj 3.5 3 -3.5 1 0 0 0
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/Model.obj

File diff suppressed because it is too large Load Diff