Open
Description
would be nice to have a way to pass in custom shaders, e.g. for a skeleton in the segmentation layer. here's an example workaround I did just by modifying the JSON
shader = """
void main() {
float compartment = vCustom2;
vec4 uColor = segmentColor();
emitRGB(uColor.rgb*0.5 + vec3(0.5, 0.5, 0.5) * compartment);
}
"""
skel_rendering_kws = {
"shader": shader,
"mode2d": "lines_and_points",
"mode3d": "lines",
"lineWidth3d": 1,
}
state_dict["layers"][1]["skeletonRendering"] = skel_rendering_kws
statebuilder.StateBuilder(base_state=state_dict, client=client).render_state(
return_as="html"
)
Metadata
Assignees
Labels
No labels