3 channel image (RGB) example
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 389
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 3
Description
Hi jbms,
Do you have a working example for 3 channel image on Neuroglancer? I am trying to troubleshoot if chunking on CloudVolume is failing or the shader control needs to be configured differently. Perhaps, three channel image need to be converted to a gray scale image and then chunked?
Thank you so much for your help.
-m
```
#uicontrol vec3 color color(default="blue")
#uicontrol float min slider(default=0, min=0, max=1, step=0.01)
#uicontrol float max slider(default=1, min=0, max=1, step=0.01)
#uicontrol float brightness slider(default=0, min=-1, max=1, step=0.1)
#uicontrol float contrast slider(default=0, min=-3, max=3, step=0.1)
float scale(float x) {
return (x - min) / (max - min);
}
void main() {
emitRGB(
color * vec3(
scale(
toNormalized(getDataValue()))
+ brightness) * exp(contrast)
);
}
```
Contributor guide
Assessment
This issue has not been assessed yet.