Claude/fix patterndisplay key prop dyakq#114
Merged
Conversation
v0.46 Shader (patternv0.46.wgsl): - Fix degenerate triangles: replaced w=0 culling with off-screen positioning (vec4(2.0, 2.0, 0.0, 1.0)) to prevent depth buffer artifacts at origin - Fix visibility culling: use boolean select() instead of float comparison - Fix alpha output: return housingMask alpha instead of hardcoded 1.0, and discard fragments with housingMask < 0.01 to prevent bleed-through PatternDisplay.tsx: - Fix WebGL cleanup on shader switch: clear overlay canvas during cleanup to prevent ghost images from previous shader - Fix bezel uniform configuration: set proper recessKind, recessOuterScale, and recessInnerScale for circular vs rectangular shader layouts - Fix debug info: populate debug overlay from WebGPU render path when WebGL overlay is inactive (was showing "Mode: NONE") https://claude.ai/code/session_01BdKEq4oqvUtgUindZjivkV
Two bugs in the WebGL caps overlay vertex shader:
1. Circular layout ellipse bug: Previously computed radii in normalized
[0,1] space then multiplied by u_resolution asymmetrically, stretching
a perfect circle into an ellipse on non-square viewports. Now mirrors
the WGSL shader exactly — uses pixel-space radii derived from minDim:
maxRadius = minDim * 0.45, minRadius = minDim * 0.15
Arc lengths and button sizes are all computed in pixel space, so the
overlay circle stays perfectly round regardless of canvas aspect ratio.
2. Instance indexing clarity: Renamed col/row to trackIndex/stepIndex to
make the axis semantics unambiguous. stepIndex = id / numChannels (step
along the ring), trackIndex = id % numChannels (which ring/channel).
Horizontal positioning now explicitly uses stepIndex for X and trackIndex
for Y, matching the WGSL background shader's coordinate convention.
JS side: cols is always numChannels to match the texture upload dimensions
(width = channels, height = rows), ensuring texelFetch reads correct cells.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
No description provided.