Compilation errors
Target API: 5 · Status: Verified
Errors that pass static validation but fail as WGSL, or fail only in the browser’s WGSL compiler (stage 2).
“bloxdTerrainVertex must be declared as: fn …”
- Cause: hook signature mismatch (argument/return types)
- Fix: rewrite to the declaration shown in the message (parameter names are free; types must match exactly)
- Prevention: start from the hook comparison table
“mixing ’*’ and ’^’ requires parenthesis (only in …)”
- Cause: WGSL requires parentheses when mixing
^&|<<>>with other operators - Fix: parenthesize the operands
”… can only be a function’s parameter or return type, …”
- Cause:
var x: BloxdSurface;— bare type-annotated declarations are rejected because header structs gain fields - Fix:
var out = bloxdDefaultSurface(s);(orvar out = s;in light hooks) - Prevention: always build outputs from
bloxdDefault*(conventions)
”_ can only be the target of a phony assignment, as in _ = f();”
- Cause:
let _ = f();is invalid WGSL - Fix: write
_ = f();
“Lite: …reads scene depth on a page that didn’t turn it on”
- Cause: a depth-reading pack (
bloxdOpaqueBehind) was active when the page was generated; depth availability is decided at page generation - Fix: reload the page with the pack active
dpdy sign looks inverted
- This is by design: the analyzer auto-rewrites every
dpdy/dpdyCoarse/dpdyFinecall to(-dpdy(...))(screen-space y points down) - Fix: nothing — write
dpdy(h)with the intent “how does h change going up” and the emitted code carries the flip (Restrictions) dpdxandfwidthare untouched
Pack gets dropped on game join / the on-device check never finishes
- Cause: the on-device check failed, or hit the 60-second forced timeout (
skipped) — common on low-spec devices and heavy worlds - Fix: reduce heavy vertex work and complex loops; see Performance