Skip to content

Fix E1M1 clipping crashes and browser rendering - #3

Merged
dtcristo merged 2 commits into
mainfrom
dtcristo/rendering-qa
Oct 2, 2026
Merged

dtcristo merged 2 commits into
mainfrom
dtcristo/rendering-qa

Conversation

@xenorune

@xenorune xenorune commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

E1M1 could crash when a vertical wall crossed behind the camera: rounded line-intersection bounds left an endpoint unclipped, reversing portal column limits. The browser build also failed in protobuf's C runtime, then panicked on its first frame because renderer timings used std::time::Instant.

Clip walls against near/frustum half-planes by segment parameter, use Bevy's platform clock, and generate the unchanged protobuf schema with pure Rust prost. Keep the upstream published bevy_pixels 0.17 upgrade, resolve Bevy's 0.19.1 patch, and pin wasm-bindgen and CI's CLI to 0.2.127. Update build instructions, design notes, and renderer follow-up work.

Validation:

  • cargo fmt --all, cargo check --all, and all-feature check passed
  • cargo test --features "sector sector_edit doom_import": 134 tests passed
  • Both shipped maps passed sector_validate
  • just build-web completed, including release wasm and matching bindgen output
  • Computer Use verified native default/E1M1 checkpoints, including the previously crashing outdoor pose; both release browser routes rendered, accepted foreground cursor capture, and drew the automap
  • Headless sweep rendered 359 E1M1 sector centers at eight headings (2,872 frames) without a crash
  • Added regressions for the exact E1M1 pose at 4:3, wide, and tall sizes, clipping in both directions, protobuf defaults/zero portals, invalid fields, and full map round trips

Map assets and the protobuf wire schema are unchanged. Temporary QA controls and sweep tooling were removed. The editor still compiles with deprecation warnings from the upstream egui upgrade.

PR CI passed at 7bc718aba1347ac27aed17c976717963ce5801a2, including all-feature checks/tests, both map validators, and the release web bundle. Native E1M1's debug timing averaged about 5.9 ms per frame at 320×240 during Computer Use verification.

dtcristo and others added 2 commits October 3, 2026 07:21
Replace the C-backed protobuf runtime with prost using the existing schema.
Preserve field defaults, zero-valued portal targets, and color validation;
cover wire compatibility and full map round trips with regression tests.

Pin wasm-bindgen to the CLI version used by CI and document web prerequisites
and the published bevy_pixels presentation path.

Co-authored-by: Xeno <xeno@xenorune.com>
Clip wall segments by parameter against the near plane and frustum instead
of testing rounded intersection coordinates against wall bounds. This keeps
behind-camera endpoints out of projection and prevents reversed portal spans.

Add the exact E1M1 outdoor failure as a full-frame regression at baseline,
wide, and tall sizes. Use Bevy platform Instant so browser rendering and
stage timing do not panic on the wasm target.

Co-authored-by: Xeno <xeno@xenorune.com>
@dtcristo
dtcristo marked this pull request as ready for review October 2, 2026 21:44
@dtcristo
dtcristo merged commit e1cada0 into main Oct 2, 2026
4 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.

2 participants