bug: Hide shader controls hides invlerps and breaks interaction with transfer functions
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 389
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 3
Description
See [here](https://neuroglancer-demo.appspot.com/#!%7B%22dimensions%22:%7B%22x%22:%5B8e-9%2C%22m%22%5D%2C%22y%22:%5B8e-9%2C%22m%22%5D%2C%22z%22:%5B8e-9%2C%22m%22%5D%7D%2C%22position%22:%5B17213.5%2C19862.5%2C20697.5%5D%2C%22crossSectionScale%22:1%2C%22projectionScale%22:65536%2C%22layers%22:%5B%7B%22type%22:%22image%22%2C%22source%22:%22gs://neuroglancer-janelia-flyem-hemibrain/emdata/clahe_yz/jpeg/%7Cneuroglancer-precomputed:%22%2C%22tab%22:%22rendering%22%2C%22opacity%22:1%2C%22blend%22:%22additive%22%2C%22shader%22:%22#uicontrol%20invlerp%20contrast%5Cn#uicontrol%20transferFunction%20tf%5Cn#uicontrol%20vec3%20color%20color%5Cnvoid%20main%28%29%20%7B%5Cn%20%20float%20contrast_value%20=%20contrast%28%29%3B%5Cn%20%20if%20%28VOLUME_RENDERING%29%20%7B%5Cn%20%20%20%20emitRGBA%28tf%28%29%29%3B%5Cn%20%20%7D%5Cn%20%20else%20%7B%5Cn%20%20%20%20emitRGB%28color%20%2A%20contrast_value%29%3B%5Cn%20%20%7D%5Cn%7D%5Cn%22%2C%22shaderControls%22:%7B%22contrast%22:%7B%22range%22:%5B94%2C187%5D%2C%22window%22:%5B71%2C207%5D%7D%2C%22tf%22:%7B%22controlPoints%22:%5B%5B0%2C%22#000000%22%2C0%5D%2C%5B62%2C%22#ffffff%22%2C0.4549019607843137%5D%2C%5B205%2C%22#ffffff%22%2C0%5D%2C%5B255%2C%22#ffffff%22%2C1%5D%5D%7D%7D%2C%22volumeRendering%22:%22on%22%2C%22volumeRenderingDepthSamples%22:256%2C%22name%22:%22jpeg%22%7D%5D%2C%22selectedLayer%22:%7B%22size%22:479%2C%22visible%22:true%2C%22layer%22:%22jpeg%22%7D%2C%22layout%22:%224panel-alt%22%2C%22helpPanel%22:%7B%22row%22:2%7D%2C%22settingsPanel%22:%7B%22row%22:3%7D%2C%22toolPalettes%22:%7B%22Shader%20controls%22:%7B%22side%22:%22left%22%2C%22row%22:1%2C%22query%22:%22type:shaderControl%22%7D%7D%7D) for an example.
I think the transfer function issue is that for some reason it is constantly recreating the element containing the shader controls.
Contributor guide
Research direction
Start with the shader controls and transfer-function behavior shown in the linked Neuroglancer reproduction. Trace how hiding shader controls affects invlerp controls and how the transfer-function element is recreated. Done means hiding the controls no longer hides invlerps and transfer functions remain interactive.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100