Skip to content

Enhance Frosted Caps with Dynamic Data Lighting (Blue/Orange) #73

@ford442

Description

@ford442

We need to upgrade the "Frosted Cap" visual system in the modern shaders (v0.43 - v0.46) to provide better feedback on pattern data. The caps should act as diffuse light covers that react to both the presence of notes and the playback state.

Affected Shaders

patternv0.43.wgsl (Frosted Horizontal 32)

patternv0.44.wgsl (Frosted Horizontal 64)

patternv0.45.wgsl (Frosted UI)

patternv0.46.wgsl (Frosted Horizontal)

Desired Behavior

Lighting Logic (Multi-State):

Data Presence (Idle): If a step contains note data, the cap should emit a steady, ambient Blue Glow. This allows the user to read the pattern ahead of the playhead.

Active Trigger (Hit): When the playhead crosses a step with a note, the cap should flash Orange (or mix with the specific Channel Color).

Goal: A clear visual distinction between "This step has a note" (Blue) and "This note is playing now" (Orange/Bright).

Material Rendering (Diffusion):

The caps currently might be too transparent or revealing.

Requirement: The material should be translucent but highly diffusive (like frosted acrylic or heavy glass).

Constraint: The internal "virtual LED" emitter shape (simple round distance field) must not be visible as a sharp dot. The light should scatter to fill the volume of the square/round cap.

Implementation Notes

This will likely require updating the fragment shader logic in PatternDisplay.tsx (the WebGL2 overlay) or the WGSL background if the caps are drawn there.

We may need to pass the note_value more explicitly to the fragment stage to control the "Blue" state, and combine it with v_active for the "Orange" state.

Task List

[ ] Update Fragment Shader to support dual-color mixing (Blue Base + Orange Highlight).

[ ] Tune smoothstep or density functions to diffuse the point light source across the entire cap volume.

[ ] Apply changes to the shared shader logic used by v0.43-v0.46.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions