summaryrefslogtreecommitdiff
path: root/src/modules/ray/ray_object_sphere.h
AgeCommit message (Collapse)Author
2017-08-15ray: misc computational fixupsVito Caputo
ray:object intersection coordinates were incorrectly being computed relative to the ray origin using a subtraction instead of addition, a silly mistake with surprisingly acceptable results. Those results were a result of other minor complementary mistakes compensating to produce reasonable looking results. In the course of experimenting with an acceleration data structure it became very apparent that 3d space traversal vectors were not behaving as intended, leading to review and correction of this code.
2017-06-03ray: convert from recursive to iterative tracingVito Caputo
Small speedup, I personally find the code cleaner this way too. Everything in the hot path should now be inlined, no function calls.
2017-06-02ray: precompute primary ray for ray_object_sphere_tVito Caputo
This gets rid of some computation on the primary ray:plane intersection tests The branches on depth suck though... I'm leaning towards specialized primary ray intersection test functions.
2017-06-02ray: plumb depth and camera to objectsVito Caputo
To enable prepare to precompute aspects of primary rays which all have a common origin at the camera, bring the camera to ray_object*_prepare() and bring the depth to ray_object*_intersects_ray() for primary ray detection. This is only scaffolding, functionally unchanged.
2017-05-12ray: mult normalize in ray_object_sphere_normalVito Caputo
Simple optimization taking advantage of the prepare, mults generally are cheaper than divs.
2017-05-12ray: add ray_scene_prepare() object precomputingVito Caputo
Just embed a _prepared struct in the object where precomputed stuff can be cached. Gets called once before rendering, which ends up calling the object-specific ray_object_$type_prepare() methods per object.
2017-02-12ray: remove vestigial stdio.h includeVito Caputo
Leftover from debugging presumably
2017-02-09ray: fix mistake in ray:sphere intersection mathVito Caputo
2017-01-18*: move source into src/ subdirVito Caputo
Restoring some organizational sanity since adopting autotools.
© All Rights Reserved