I want to start developing a hybrid renderer: it first applies a rasterizer, then stores for each pixel the surface pointer, normal vector, and distance to the camera.
Then it raytraces reflections, refractions, lambertian diffuse, etc using those values.
The first problem however is rasterizing a sphere: while there are many tutorials for rasterizing quads and triangles, there aren't any on spheres, and I don't know how to do this myself while keeping perspective intact.
So how do you perfectly rasterize an explicit sphere (with radius, center)?
GL_SPHERE
or anything of the sort. $\endgroup$