Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

precomputed annotation spec supports non-float values but front-end does not #572

Open
fcollman opened this issue Apr 10, 2024 · 1 comment

Comments

@fcollman
Copy link
Contributor

the precomputed skeleton spec allows for non floating point vertex attributes including "int8", "uint8", "int16", "uint16", "int32", "uint32" but neuroglancer will error on any source that has anything but floats for vertex attributes. (due to this check ).

I think if possible it should support displaying skeletons with this extra types, ideally make it possible to alter rendering based on them, but at a minimum just skip over them so the data can be stored there but display is not affected.

A more general point, it seems like the rendering system for skeletons should show properties with names in the UI like it does for annotation properties, rather than relying upon the shader writer to know vCustomX maps to the Xth vertex property with no context as to what the property is or is called.

@davidackerman
Copy link
Contributor

In case it helps, I think you can reference the vertex property by the name assigned to it rather than vCustomX. For example, I named mine "lsp" and can reference it in the shader by that. But I agree that having it in the UI like the others would be help.

Another question I have about precomputed skeleton rendering is how do I change the alpha? For example, this seems to work fine:

void main() {
  float norm = 10000.0f;
  float alphaNorm = 10000.0f;
  emitRGB(vec3(1.0f-lsp/norm, lsp/norm, 0.0f));
}

but this does not:

void main() {
  float norm = 10000.0f;
  float alphaNorm = 10000.0f;
  emitRGBA(vec4(1.0f-lsp/norm, lsp/norm, 0.0f, lsp/alphaNorm));
}

The alpha doesn't seem to work properly and the colors are affected by the underlying color assigned to the ID. Also when using alpha, even if lines is selected, the points show up instead sometimes.

Is there a way to get alpha to work with skeletons?

image image

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

No branches or pull requests

2 participants