Skip to content

fix: improve shader and canvas backend parity#30

Open
zao111222333 wants to merge 1 commit into
donkeyteethUX:mainfrom
zao111222333:main
Open

fix: improve shader and canvas backend parity#30
zao111222333 wants to merge 1 commit into
donkeyteethUX:mainfrom
zao111222333:main

Conversation

@zao111222333

Copy link
Copy Markdown
Contributor

Previously, the two rendering paths had several visible differences: Shader markers had jagged edges, Canvas ring/triangle markers did not match Shader output, Canvas grid lines appeared heavier, and Canvas plots did not refresh ticks immediately during resize until the cursor moved over the plot.

This PR updates backend rendering so that:

  • Shader markers use smoother antialiasing
  • Shader star markers render as an explicit star polygon
  • Shader rendering uses a 4x MSAA offscreen target with a composite pass
  • Canvas ring and triangle markers match the Shader marker geometry more closely
  • Canvas hover/pick highlight masks match marker size more closely
  • Canvas grid lines use a thinner stroke to match Shader grid weight
  • Canvas plots redraw immediately on resize
  • tick positions/labels update live during resize for both Shader and Canvas
  • examples/backends.rs compares Shader and Canvas rendering side by side

Demo

examples/backends.rs shows all marker styles rendered by both backends.

Before:

Screen.Recording.2026-06-16.at.22.08.56.mp4

Now:

Screen.Recording.2026-06-16.at.22.08.00.mp4

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.

1 participant