diff --git a/README.md b/README.md index cc95866..556230f 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,4 @@ C implementation of the [*Ray tracing in one week-end*](https://raytracing.githu ![Ray tracing in one week-end book cover](examples/book-cover.png) ![Earth](examples/earth.png) ![Cornell box](examples/cornell.png) +![Complex scene](examples/complex-scene.png) diff --git a/examples/complex-scene.png b/examples/complex-scene.png new file mode 100644 index 0000000..f0298a9 Binary files /dev/null and b/examples/complex-scene.png differ diff --git a/scenes.c b/scenes.c index 962d124..63104e1 100644 --- a/scenes.c +++ b/scenes.c @@ -349,5 +349,7 @@ const Hittable *complex_scene(Arena *arena) { (Vec3){-100, 270, 395}, arena), arena); - return objects; + Hittable *bvh_root = hittable_create_bvh_node( + objects->list.objects, 0, objects->list.size, 0.0, 1.0, arena); + return bvh_root; }