summaryrefslogtreecommitdiffstats
path: root/libdimension/raytrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/raytrace.c')
-rw-r--r--libdimension/raytrace.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libdimension/raytrace.c b/libdimension/raytrace.c
index 2c389dc..8adde41 100644
--- a/libdimension/raytrace.c
+++ b/libdimension/raytrace.c
@@ -75,6 +75,12 @@ static int
dmnsn_raytrace_scene_thread(void *ptr)
{
dmnsn_raytrace_payload *payload = ptr;
+
+ /* Pre-calculate bounding box transformations, etc. */
+ DMNSN_ARRAY_FOREACH (dmnsn_object **, object, payload->scene->objects) {
+ dmnsn_object_precompute(*object);
+ }
+
payload->prtree = dmnsn_new_prtree(payload->scene->objects);
dmnsn_raytrace_payload *payloads;