Schlieren Lab simulates schlieren photography — an optical technique for visualizing density gradients in transparent media. Developed in the 19th century, schlieren imaging uses a knife-edge cutoff to convert invisible refractive index variations (from heat, pressure, or gas mixing) into visible light and dark patterns. It is widely used in aerodynamics, combustion research, and fluid mechanics.
The shader generates thermal plume sources with FBM turbulence to create realistic convective flow patterns. The schlieren knife-edge effect is computed by taking the spatial gradient of the refractive index field — horizontal gradients appear as brightness variations when using a vertical knife edge, and vice versa. Both classic black-and-white and color (rainbow) schlieren modes are available, where gradient direction maps to hue.
Interactive controls adjust plume temperature, turbulence intensity, knife-edge orientation, sensitivity, and color mode. Multiple heat sources can be positioned to create interacting thermal flows.