Starting a mini ray tracer with ShaderToy

Today I started a new project called Toycer. Because it is expected to be a ray tracer built with ShaderToy. After I tried to implement a ray tracer with WebGL, I have got some basic ideas about how to start from scratch.

For the first part I set up a scene, where the camera sits at (0., 0., 2.) and a sphere is at (0., 0., -4.). So the camera looks into -z direction. Currently there is no shading for it. The color here depends on the t value of the hit point. And it looks like this:

Some helpful videos I referred to on Youtube: