diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2017-09-13 13:55:22 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2017-09-13 13:59:19 -0700 |
commit | 121846b0e35607bf8b48d5ce304a65e2657be455 (patch) | |
tree | 7877e16b4b4949d65f3fc46373c5850cb72b4f88 /src/modules/ray/ray.c | |
parent | cf586253932e04f3c5a2be2c3d6d3ff5b1301ce0 (diff) |
ray: cleanup ray_camera_frame_t fragments
Previously every fb_fragment_t (and thus thread) was constructing
its own ray_camera_frame_t view into the scene, duplicating some
work.
Instead introduce ray_camera_fragment_t to encapsulate the truly
per-fragment state and make ray_scene_render_fragment() operate
on just this stuff with a reference to a shared
ray_camera_frame_t prepared once per-frame.
Some minor ray_camera.c cleanups sneak in as well (prefer multiply
instead of divide, whitespace cleanups...)
Diffstat (limited to 'src/modules/ray/ray.c')
-rw-r--r-- | src/modules/ray/ray.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/ray/ray.c b/src/modules/ray/ray.c index ac00806..60784db 100644 --- a/src/modules/ray/ray.c +++ b/src/modules/ray/ray.c @@ -154,7 +154,7 @@ static void ray_prepare_frame(void *context, unsigned n_cpus, fb_fragment_t *fra /* ray trace a simple scene into the fragment */ static void ray_render_fragment(void *context, fb_fragment_t *fragment) { - ray_scene_render_fragment(&scene, &camera, fragment); + ray_scene_render_fragment(&scene, fragment); } |