Skip to content

Packages built before the WESL kernel open again; uncompilable scene functions no longer panic - #82

Merged
doodlewind merged 1 commit into
mainfrom
wgsl-legacy
Nov 14, 2026
Merged

doodlewind merged 1 commit into
mainfrom
wgsl-legacy

Conversation

@doodlewind

Copy link
Copy Markdown
Collaborator

Bug: Daylight Home (published on threert.app 2026-11-13) did not open in ThreeRT 0.4.2 on any platform. Its bundle carries @threert/scene's material library as it was before #70; that library's surface hash is a * b ^ c * d, which naga accepted and WESL (by the WGSL grammar) refuses. kernel_wgsl panicked (gpu.rs:760, "unexpected token ^"), and ThreeRT for Android then treated the device as having no renderer and offered only "Open in the browser".

Fix:

  • legacy_wgsl parenthesises exactly the two expressions The kernel's variants by WESL's conditional translation, and the repository's Rust pinned (1.100.0) #70 parenthesised in the library, in the order naga read them (same hash, same picture), in a scene's material / volume / geometry functions. Nothing else is touched. A unit test checks that the old library fails as written and compiles after the shim (and will flag when WESL starts accepting it).
  • try_kernel_wgsl / try_wesl_wgsl: if a scene's functions still don't compile (a game's own WGSL), the kernel is built without them and the game's log says why (script::engine_log). No panic.

🤖 Generated with Claude Code

…ions that do not compile no longer take the engine down

Daylight Home (published 2026-11-13) did not open on ThreeRT 0.4.2 on any platform: its bundle carries the scene
library as it was before #70, whose surface hash is `a * b ^ c * d`, which naga took and WESL refuses, and
`kernel_wgsl` panicked. ThreeRT for Android then took the device for one without a renderer.

- `legacy_wgsl`: the two expressions #70 parenthesised are parenthesised in a scene's functions too, in the order
  naga read them (the same hash, the same picture); nothing else is touched. A test holds that the old library fails
  as written and compiles through it.
- `try_kernel_wgsl` / `try_wesl_wgsl`: a kernel whose scene functions do not compile is made without them, and the
  game's log says why (`script::engine_log`), instead of a panic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@doodlewind
doodlewind merged commit 0a190f8 into main Nov 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant