Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@aganders3
Copy link
Contributor

This fixes some issues with instanced markers rendering, and adds a few performance improvements.

Fix marker picking for instanced markers:

  • Fix MarkerPickingFilter to set correct divisor for instanced rendering
  • All marker tests now run with both 'points' and 'instanced' rendering methods

Instanced marker performance improvements:

  • Use triangle strip topology (4 vertices instead of 6, fewer vert shader invocations)
  • Add v_total_size varying to eliminate redundant fragment shader calculations
  • Use shader templating for conditional gl_FragDepth to enable Early-Z optimization for non-spherical markers

For canvas size clamping:

  • Add floor at 50% of min marker size to keep edges visible when zoomed out
  • Add cap at 50% of marker radius to prevent edges from dominating small markers
  • Fixes highlight rendering issues in napari when zooming

Copy link
Collaborator

@brisvag brisvag left a comment

Choose a reason for hiding this comment

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

Love this! Nice addition to the tests as well, good to know we didn't break everything else 😅

@aganders3
Copy link
Contributor Author

Thanks! This also unifies the code even further as a benefit.

I think the only tests we missed before were for the picking filter.

@brisvag brisvag merged commit ed8ed79 into vispy:main Jan 7, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants