Repository navigation
Heat Haze example: no white screen on the Canvas renderer - #1772
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Heat Haze example showed a solid white frame on the Canvas renderer. It predates the recent changes: the engine from
d9abca5e0does 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
pnpm lintpasses.🤖 Generated with Claude Code
https://claude.ai/code/session_01SeWCkETjW35ZbXDRswV1hx