Example 51 - Clearcoat (mk_pbr_desc.clearcoat).
← All examples51_clearcoat
A clear coat is a second near-smooth GGX specular lobe (fixed F0 0.04 = IOR 1.5) on top of the base material -- car paint, lacquered wood, acrylic. It is a plain mk_pbr_material field, so it works on hand-built spheres exactly as on a loaded glTF primitive. Requires both packages: ./scripts/build-linux.sh --pbr --ibl --target=51_clearcoat Grid on a deep-red dielectric base: rows (top->bottom) sweep clearcoat 1->0; columns (left->right) sweep base roughness 0->1. The coat's sharp gloss stays put across a row even as the base roughens underneath it. Controls: C = toggle clearcoat, [ / ] = coat roughness, TAB = debug channel, drag = orbit, scroll = zoom, ESC = quit.

Runs the WebAssembly build on this page. Click the canvas to give it keyboard focus.
- Number
- 51
- Tags
- Source
examples/51_clearcoat/main.c
Build and run
./scripts/build-linux.sh release --target=51_clearcoat --run