Refactored rendering kernel to extract the ray tracing logic from the optional supersampling logic.
Added options for rendering.