Implementing GPU-based ray tracing