
Fixed a bug and it looks ok now.

The result is not that impressive with ray differentials only computed for the plane. The reflected texture got screwed because I did not propagate the differentials through reflection need to come up with a clever solution for that. Also, there is a tiny error in the course note that the full differential to the plane q = p + td should include the partial t/partial d term.

Rendered after incorporating the ray differentials.

Created a test scene to test the ray differentials. Default bilinear sample.

Never mind. The spherical mapping matched the OpenGL result.

minimal working code, 3 bounces, no texture filtering. I did the sphere uv map exactly as the course note, u = atan2y, x / 2pi + 0.5, v = z + 1 / 2, but it looks like the v coordinate is off.