Add complex scene rendering example

This commit is contained in:
Jean-Michel Gorius 2022-11-14 18:15:59 +01:00
parent d6636bc844
commit 301dcd3c61
3 changed files with 4 additions and 1 deletions

View File

@ -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) ![Ray tracing in one week-end book cover](examples/book-cover.png)
![Earth](examples/earth.png) ![Earth](examples/earth.png)
![Cornell box](examples/cornell.png) ![Cornell box](examples/cornell.png)
![Complex scene](examples/complex-scene.png)

BIN
examples/complex-scene.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 KiB

View File

@ -349,5 +349,7 @@ const Hittable *complex_scene(Arena *arena) {
(Vec3){-100, 270, 395}, arena), (Vec3){-100, 270, 395}, arena),
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;
} }