summaryrefslogtreecommitdiff
path: root/src/photon.h
AgeCommit message (Collapse)Author
2011-08-15woops. dot product should be clamped to [-1.0,1.0].Anthony LaTorre
2011-08-15fix nan bug by clamping dot() of surface normal and -photon direction to ↵Anthony LaTorre
[0.0,1.0]
2011-08-13A faulty optical process can make the position or direction of theStan Seibert
photon into NaN on the GPU. Now we abort these photons rather than let them lock up the intersect_mesh() method. There is a new history bit (#31) that indicates when a NAN_ABORT has occurred, and this bit is checked for by GPU.propagate(). If set for any of the photons, a warning message is printed. While not as good as preventing the NaN problem in the first place, this at least ensures we are aware of the problem.
2011-07-30when throwing photons from the light source out onto the scene, photons are ↵Anthony LaTorre
now thrown randomly across each triangle instead of only at the center of each triangle. all of the rendering kernels have been rewritten so that they operate additively; for example, you may now throw photons from the light source onto the scene, render from the camera to the scene, then throw more photons and render again.
2011-07-21pull random number generator states out of the photon struct; this allows ↵Anthony LaTorre
you to copy photon information within a thread but still keep a single random number generator throughout the thread.
2011-07-21hybrid monte carlo render now distinguishes between the two different sides ↵Anthony LaTorre
of each triangle. reduced the number of runs to average when propagating photons from each pixel in render.py from 5 to 1; the speed improvement outweighs any small improvement in the quality of the rendered image.
2011-07-20in the previous commit i wrongly edited the code to reflect/transmit across ↵Anthony LaTorre
a boundary
2011-07-20pulled a lot of the photon propagation code out of src/kernel.cu into ↵Anthony LaTorre
src/photon.h so that photon propagation by propagate() in kernel.cu and the hybrid monte carlo ray tracing use the same code. instead of a single state, photons now carry the history of the processes they've undergone. this history is stored as a bitmask; see src/photon.h. start_node and first_node of the mesh are now stored as global variables in mesh.h instead of being passed to kernel functions.