CD Hologram Lab recreates the rainbow light patterns seen on the surface of CDs and DVDs — caused by diffraction gratings etched into the disc's polycarbonate layer. When white light hits the microscopic spiral track, different wavelengths diffract at different angles, producing the characteristic shifting rainbow bands.
The shader implements the diffraction grating equation (d·sin(θ) = mλ) to compute wavelength-dependent reflection angles across the disc surface. The spiral track geometry creates concentric and radial rainbow patterns that shift with viewing angle and light position. Multiple diffraction orders (m = 1, 2, 3) produce overlapping spectral fans with decreasing intensity.
Interactive parameters control light source position, disc tilt angle, track pitch, and viewing perspective. The result captures the hypnotic quality of tilting a CD under a light source and watching rainbows sweep across its surface.