jan-van-bergen/GPU-Raytracer

Problems with SBVH construction

Zachary-Zuo opened this issue · 1 comments

When trying to run without modifying any code, because there is no .svbh file, SBVH will be built automatically, but an error will be reported during the build process:

Assertion failed: goes_left || goes_right, file E:\Codes\GPU-Pathtracer-master\SBVHBuilder.cpp, line 253

At this time,BVH_TYPE=BVH_CWBVH.

If you use the release mode to build, although there will be no error, it will be permanently stagnant and will not be rendered.

Yeah this is a known issue in debug mode.
The SBVH Builder code is an absolute mess with a lot of ad-hoc fixes.
I'm currently working on some other stuff but once I have the time I really should refactor the whole thing.

Try changing line 146 of MeshData.h to #if 1 so that the regular BVH is always used as a base BVH. That will at least temporarilly circumvent the issue with the SBVH.
I doubt it will fix the black screen though, I think that's more related to the previous issue you posted.