Worksheet 7 โ€” Part 3 ยท Reflective Sphere

WebGPU not supported.

The sphere is now a mirror ball: the environment is looked up along the reflected view vector. Drag to orbit.

Reflection: the incident direction is iw = pw โˆ’ e (world fragment position minus eye), and the reflected direction is rw = reflect(iw, nw). A reflective uniform selects this path for the ball while the background quad keeps sampling along its ray direction.