Skip to content

fix(config): reduce raindropLength in mathcode/mathcode-3d to restore transparency#112

Merged
ap0ught merged 3 commits into
masterfrom
copilot/fix-mathcode-transparency
Apr 24, 2026
Merged

fix(config): reduce raindropLength in mathcode/mathcode-3d to restore transparency#112
ap0ught merged 3 commits into
masterfrom
copilot/fix-mathcode-transparency

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 23, 2026

mathcode and mathcode-3d rendered as solid opaque strips rather than the characteristic falling-rain effect with dark gaps between glyphs. The 3d mode (above, green) correctly shows depth; mathcode (above, cyan) does not.

Root Cause

The raindrop brightness shader samples numColumns × 0.01 / raindropLength cycles 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.

Config raindropLength Visible cycles Strip frequency
mathcode (before) 1.2 0.42 18% of the time
mathcode-3d (before) 0.55 0.80 degraded depth
mathcode (after) 0.45 1.09 0%
mathcode-3d (after) 0.30 1.47 0%
3d reference 0.30 2.67 0%

Changes

  • js/config.jsmathcode: raindropLength 1.20.45. Guarantees ≥1 full brightness cycle visible across the column, eliminating solid-strip phases.
  • js/config.jsmathcode-3d: raindropLength 0.550.30. Aligns with classic 3d, trinity, and bugs configs; increases visible cycles from 0.80 → 1.47.

Copilot AI linked an issue Apr 23, 2026 that may be closed by this pull request
…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
Copilot AI requested a review from ap0ught April 23, 2026 21:48
@ap0ught ap0ught marked this pull request as ready for review April 24, 2026 04:10
Copilot AI review requested due to automatic review settings April 24, 2026 04:10
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 24, 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

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.raindropLength from 1.2 to 0.45.
  • Decrease mathcode-3d.raindropLength from 0.55 to 0.3.
  • Add explanatory inline comments describing the rationale for the new values.

Comment thread js/config.js Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ap0ught ap0ught merged commit adf34f0 into master Apr 24, 2026
4 checks passed
@ap0ught ap0ught deleted the copilot/fix-mathcode-transparency branch April 24, 2026 04:14
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.

mathcode is not transparent

3 participants