Skip to content

Conversation

@jwindhager
Copy link
Member

No description provided.

@jwindhager jwindhager requested a review from cavenel January 21, 2026 23:07
@jwindhager jwindhager self-assigned this Jan 21, 2026
Copilot AI review requested due to automatic review settings January 21, 2026 23:07
@jwindhager jwindhager added the enhancement New feature or request label Jan 21, 2026
@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (5976c9e) to head (e249f10).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##            main       #51       +/-   ##
===========================================
+ Coverage   4.41%   100.00%   +95.58%     
===========================================
  Files         77         5       -72     
  Lines       4324        71     -4253     
  Branches     112        17       -95     
===========================================
- Hits         191        71      -120     
+ Misses      4098         0     -4098     
+ Partials      35         0       -35     
Flag Coverage Δ
unittests 100.00% <ø> (+95.58%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

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

This PR refactors the point rendering system to avoid premultiplying point sizes on the CPU, moving size calculations to the GPU shader instead. This improves the separation of concerns and allows the shader to handle size transformations more accurately.

Changes:

  • Removed sizeFactor parameter from LoadUtils.loadSizeData() to store raw size values without premultiplication
  • Added new uniforms to the shader for viewport size, canvas size, and device pixel ratio to enable proper size calculations
  • Modified the WebGL controller to pass size factors separately in a uniform buffer object instead of premultiplying them into size data

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
packages/@tissuumaps-core/src/utils/LoadUtils.ts Removed sizeFactor parameter and all premultiplication logic from size data loading
packages/@tissuumaps-core/src/controllers/WebGLPointsController.ts Added new uniform locations, modified buffer layout to store size factors separately, updated state tracking
packages/@tissuumaps-core/src/assets/shaders/points.vert Added new uniforms, implemented size calculations in shader, improved point discarding logic with viewport culling
Comments suppressed due to low confidence (1)

packages/@tissuumaps-core/src/controllers/WebGLPointsController.ts:629

  • Incorrect buffer target for loading uniform buffer data. The code is using this._gl.ARRAY_BUFFER as the target when loading data into this._buffers.objectsUBO, but this buffer should be bound as this._gl.UNIFORM_BUFFER since it's a uniform buffer object (UBO). While WebGL may be lenient about this, it's semantically incorrect and could lead to issues or confusion.
    WebGLUtils.loadBuffer(
      this._gl,
      this._gl.ARRAY_BUFFER,
      this._buffers.objectsUBO,

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jwindhager jwindhager merged commit 617138e into main Jan 22, 2026
9 checks passed
@jwindhager jwindhager deleted the refactor/points-rendering branch January 22, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants