Commit c4c4766
committed
fix: only drain WGSL shader include loaders for WGSL effects
LoadPendingIncludesAsync was called unconditionally in effect.ts for all
effects. In the CDN bundle, all WGSL shader modules execute at load time and
push their include loaders to _PendingIncludesLoaders. The first GLSL/WebGL
effect created would then drain the entire WGSL loader queue before proceeding,
stalling shader initialization until hundreds of dynamic imports resolved.
This caused visual timing regressions in 24 WebGL2 visualization tests.
Fix: gate the call on ShaderLanguage.WGSL so only WGSL effects process the
include queue. GLSL effects still get LoadPendingIncludesAsync via their
extraInitializationsAsync callback (in each material's shader loading code)
for any WGSL includes that happen to be pending at that point.1 parent 3385578 commit c4c4766
1 file changed
+9
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
434 | 439 | | |
435 | 440 | | |
436 | 441 | | |
| |||
0 commit comments