fix(config): reduce raindropLength in mathcode/mathcode-3d to restore transparency#112
Merged
Merged
Conversation
…rency/strip issue The mathcode config had raindropLength: 1.2 (mathcode) and 0.55 (mathcode-3d). These values caused columns to show as solid bright strips because only 0.42 and 0.78 of a full brightness cycle were visible across the column height respectively. When visible cycles < 1.0, there are time intervals where no row in a column has a dark/invisible brightness value, making the whole column appear as a solid lit strip. Fixes: - mathcode: raindropLength 1.2 -> 0.45 (1.09 visible cycles, always has dark gaps) - mathcode-3d: raindropLength 0.55 -> 0.3 (1.47 visible cycles, matching classic 3d) Both configs now guarantee that at least one full brightness cycle is visible across the column at all times, ensuring proper dark gaps between raindrop glyphs. Reference: classic '3d' uses numColumns=80, raindropLength=0.3 = 2.67 visible cycles. Agent-Logs-Url: https://github.com/ap0ught/matrix/sessions/094262f1-c9e9-4a78-8ed0-4e8630aaa530 Co-authored-by: ap0ught <41078+ap0ught@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix transparency issue in mathcode 3D rendering
fix(config): reduce raindropLength in mathcode/mathcode-3d to restore transparency
Apr 23, 2026
🎬 PR Preview Deployed!Your changes are now available for testing: Preview URL: https://ap0ught.github.io/matrix/pr-112/ Test Links:The preview will be updated automatically when you push new commits. Preview deployed from commit 7d26c97 |
There was a problem hiding this comment.
Pull request overview
Adjusts raindropLength defaults for mathcode and mathcode-3d presets to prevent fully-lit columns (opaque strips) and restore the characteristic dark gaps between glyphs.
Changes:
- Decrease
mathcode.raindropLengthfrom1.2to0.45. - Decrease
mathcode-3d.raindropLengthfrom0.55to0.3. - Add explanatory inline comments describing the rationale for the new values.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
mathcodeandmathcode-3drendered as solid opaque strips rather than the characteristic falling-rain effect with dark gaps between glyphs. The3dmode (above, green) correctly shows depth;mathcode(above, cyan) does not.Root Cause
The raindrop brightness shader samples
numColumns × 0.01 / raindropLengthcycles of the brightness sawtooth across the column height. When this ratio < 1.0, there are phases where every row in a column has positive brightness simultaneously — producing a solid lit strip with no dark gap.raindropLengthmathcode(before)1.20.42mathcode-3d(before)0.550.80mathcode(after)0.451.09mathcode-3d(after)0.301.473dreference0.302.67Changes
js/config.js—mathcode:raindropLength1.2→0.45. Guarantees ≥1 full brightness cycle visible across the column, eliminating solid-strip phases.js/config.js—mathcode-3d:raindropLength0.55→0.30. Aligns with classic3d,trinity, andbugsconfigs; increases visible cycles from 0.80 → 1.47.