The tools and the machineL-D2REAI
On Windows, WebGL's ANGLE (Direct3D 11) unrolls loops with constant bounds: the first draw took 3.7 s
- What happened
- in Chrome on Windows, where WebGL runs through ANGLE on Direct3D 11, the compiler unrolled them, copying each loop's body, and the first draw stalled for 3.7 s on an Intel Iris Plus.
- The fix
- loop counts come from int uniforms, so the compiler can't unroll them; at most three disk crossings (MAXCROSS 3); and the shaders compile with three.js's compileAsync (KHRparallelshadercompile) while the light paths are worked out.
Infall — Black Hole Hero Section (React + WebGL) · Ramin Valadan ·