google / google/neuroglancer

MAX_DRAW_BUFFERS limit error with shader in Safari

Open
#521 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.5k
Forks
389
Avg merge
3d 21h
Merged PRs (30d)
3

Description

I am using the pypi distribution of neuroglancer of version v2.39 through python 3.9 on a ARM Mac and running Neuroglancer in Safari, but no error in Chrome.

I and seeing the following error from the custom shader:
"out_histogram3 : output location must be < MAX_DRAW_BUFFERS"

```
#uicontrol float brightness slider(default=0.0, min=-1, max=1, step=0.1)
#uicontrol float contrast slider(default=0.0, min=-3, max=3, step=0.1)

#uicontrol bool fitc_525nm checkbox(default=true)
#uicontrol vec3 color0 color(default="red")
#uicontrol invlerp invlerp0(range=[15, 22679], window=[0, 42878], channel=0, clamp=true)

#uicontrol bool cy3_568nm checkbox(default=true)
#uicontrol vec3 color1 color(default="green")
#uicontrol invlerp invlerp1(range=[36, 1520], window=[0, 4616], channel=1, clamp=true)

#uicontrol bool texas_red_615nm checkbox(default=true)
#uicontrol vec3 color2 color(default="blue")
#uicontrol invlerp invlerp2(range=[29, 6817], window=[0, 35420], channel=2, clamp=true)

#uicontrol invlerp invlerp3(range=[29, 6817], window=[0, 35420], channel=3, clamp=true)

void main() {
vec3 cum = vec3(0., 0., 0.);
...
emitRGB((cum+brightness)*exp(contrast));
}

```

Contributor guide

Open the contributing guide

Research direction

No file or test is named. First reproduce the supplied custom shader in Safari and Chrome, then trace the shader compilation and output-buffer path; done means the shader no longer triggers the MAX_DRAW_BUFFERS error in Safari while preserving Chrome behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.