Safe Haskell | Safe-Inferred |
---|
Documentation
data PacketColor Source
Result of tracing a packet of 4 rays at once.
PacketColor !Color !Color !Color !Color |
trace :: ctxa -> Shader t m ctxa ctxb -> SolidItem t m -> Ray -> Flt -> Int -> (ColorA, [t], Rayint t m)Source
Given a scene, a shader, a ray, a maximum distance, and a maximum recursion depth, test the ray for intersection against the object within the scene, then pass the ray intersection to the shade routine (which may trace secondary rays of its own), which returns a color. For most applications, this is the entry point into the ray tracer.