Skip to content

[sigma] Fixes WebGL errors in node and edge label picking - #1563

Merged
jacomyal merged 5 commits into
jacomyal:mainfrom
gdlambda:fix/label-picking-fragment-output
Oct 26, 2026
Merged

jacomyal merged 5 commits into
jacomyal:mainfrom
gdlambda:fix/label-picking-fragment-output

Conversation

@gdlambda

Copy link
Copy Markdown
Contributor

Pull request type

  • Bugfix

What is the current behavior?

Node and edge label picking shaders discard fragments without writing fragColor. Chromium reports GL_INVALID_OPERATION: Active draw buffers with missing fragment shader outputs.

Fixes #1562.

What is the new behavior?

Both shaders initialize fragColor before discarding, following the suggested fix. This keeps the fragment output active without changing visible rendering or picking behavior.

Other information

Added regression tests for node and edge label rendering. Both reproduce the WebGL error before the fix and pass afterward.

@jacomyal

Copy link
Copy Markdown
Owner

Hi @gdlambda, and thanks a lot for this PR, and for the very clear issue!

I checked it locally:

  • The new test fails without the fix
  • It passes with it

Two notes, though:

  • I like to have a first commit with the regression test, and then another with the fix (that makes it easier for me to test that the regression test is a good bug proof, and the fix a proper fix)
  • I don't use conventional commits in this repository

So, I'm using this occasion to update the contributor guide, sorry for the timing.

I'd be happy to rework your commit myself:
I'd split and reword it on your branch, and you'd stay the author of both commits. Are you OK with that?
Of course, if you'd prefer to do it yourself, that works great too.

Thanks again 🙏

@gdlambda

Copy link
Copy Markdown
Contributor Author

Yeah @jacomyal I'm fine with that :D

Thank you!

jacomyal and others added 5 commits October 26, 2026 15:28
Details:
- Applies ?camera=x,y,ratio,angle after Sigma construction
This commit fixes jacomyal#1544.

Details:
- Adds keepUpright edge label option, defaulting to true
- Reverses labels whose path points left on screen
- Keeps above/below positions relative to the text
- Aligns label backgrounds and picking with the text
- Updates core/events snapshot for upright labels
Details:
- Adds keepUpright toggle to the edge label styles example
- Lets example e2e cases pass URL params and snapshot variants
- Snapshots one rotated, zoomed edge with and without keepUpright
This commit adds (currently failing) regression tests for jacomyal#1562.

Co-authored-by: Alexis Jacomy <alexis.jacomy@gmail.com>
This commit fixes jacomyal#1562. It writes fragColor before discard in both node
and edge label picking shader.

Co-authored-by: Alexis Jacomy <alexis.jacomy@gmail.com>
@jacomyal
jacomyal force-pushed the fix/label-picking-fragment-output branch from a8f76ba to 36dab07 Compare October 26, 2026 16:20
@jacomyal
jacomyal merged commit 36dab07 into jacomyal:main Oct 26, 2026
@jacomyal

Copy link
Copy Markdown
Owner

Awesome, thanks!
FYI I pushed, but I didn't release yet, I have something to finish first.
The new version with your fix should arrive later this week.

@gdlambda

Copy link
Copy Markdown
Contributor Author

Thank you very much 👍

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.

WebGL INVALID_OPERATION on every render: label fragment shader never writes fragColor in PICKING_MODE

2 participants