google / neuroglancer

WebGL-based viewer for volumetric data
Apache License 2.0
1.03k stars 286 forks source link

MAX_DRAW_BUFFERS limit error with shader in Safari #521

Open blowekamp opened 5 months ago

blowekamp commented 5 months ago

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));
    }