Implementing a simple ray-tracer using the GPU that runs in real-time is really easy using the compute shader. As the output generates a 'visual' output (image) the output for the compute shader is a texture buffer. The texture buffer is copied to the HTML canvas output after it's finished.