Skip to content

Comments

feat(skeleton): skeleton line width control and conversion from model units#878

Open
chrisj wants to merge 5 commits intogoogle:masterfrom
seung-lab:cj-skeleton-shader-line-width-model-units
Open

feat(skeleton): skeleton line width control and conversion from model units#878
chrisj wants to merge 5 commits intogoogle:masterfrom
seung-lab:cj-skeleton-shader-line-width-model-units

Conversation

@chrisj
Copy link
Contributor

@chrisj chrisj commented Feb 2, 2026

continuing from: #820

Based on this section from the skeleton documentation:

The special vertex attribute id of "radius" may be used to indicate the radius in "stored model" units; it should have a "data_type" of "float32" and "num_components" of 1.

I've renamed the shader function to "modelToPixels"

The documentation also indicates:

If using a "radius" attribute, the scaling applied by "transform" should be uniform

So I think it is fine to keep the calculation of the scaling factor to be based on just a single dimension. What is lacking is the ability to use the display dimension scale. I think a 3d approach to rendering skeletons is the right choice if that matters.

I will look into finding a way to add good tests for this feature

I left in the line annotation code so we can see what adding annotation support would look like, but I will strip that out of this PR

…ls. Migrated skeleton shader editor to control vertex shader instead of fragment shader (match behavior of annotation layer).
…n indicates radius is in "stored model" units
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