Skip to content

Heat Haze example: no white screen on the Canvas renderer - #1772

Merged
obiot merged 1 commit into
masterfrom
fix/heat-haze-canvas
Oct 27, 2026
Merged

obiot merged 1 commit into
masterfrom
fix/heat-haze-canvas

Conversation

@obiot

@obiot obiot commented Oct 26, 2026

Copy link
Copy Markdown
Member

Summary

The Heat Haze example showed a solid white frame on the Canvas renderer. It predates the recent changes: the engine from d9abca5e0 does the same.

The haze is a full-screen sprite whose image is a plain white sheet. It only carries the shader effect: on WebGL and WebGPU, the effect replaces every pixel of the sheet with the rippled scene. On Canvas, shader effects are disabled (as documented), so the sprite drew its white sheet over the whole game.

The fix is six lines in the example: the haze sprite skips drawing while its effect is off. That covers the Canvas renderer, and also a lost GPU context, which would otherwise have flashed white.

Example only, no engine change, so no changelog entry.

Testing

  • Canvas: shows the tile grid, unlit and without the haze.
  • WebGL and WebGPU: unchanged, with the lit relief and the haze ripple.
  • Lint: pnpm lint passes.
  • Found by a sweep of all 54 example routes on Canvas, WebGL and WebGPU. This was the only defect: on WebGL and WebGPU every route ran on the backend asked for, drew a real frame and logged no errors.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SeWCkETjW35ZbXDRswV1hx

The haze is a full-screen sprite whose image is a plain white sheet that
only carries the shader effect: on WebGL and WebGPU the effect replaces
every pixel of it with the rippled scene. Canvas disables shader effects,
so the sheet drew over the whole game and the example showed a solid white
frame. The sheet now skips drawing while its effect is off (the Canvas
renderer, or a lost GPU context), so Canvas shows the tiles, unlit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SeWCkETjW35ZbXDRswV1hx
Copilot AI balanced review requested due to automatic review settings October 26, 2026 13:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@obiot
obiot merged commit ad16a5f into master Oct 27, 2026
6 checks passed
@obiot
obiot deleted the fix/heat-haze-canvas branch October 27, 2026 08:34
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