diff --git a/GLMakie/assets/shader/shadertoy.frag b/GLMakie/assets/shader/shadertoy.frag index a7afe50a676..b7d4cd16a5a 100644 --- a/GLMakie/assets/shader/shadertoy.frag +++ b/GLMakie/assets/shader/shadertoy.frag @@ -4,12 +4,13 @@ {{TOY_SHADER}} in vec2 f_uv; -layout (location = 0) out vec4 fragment_color; -layout (location = 1) out uvec2 fragment_groupid; + +uniform uint objectid; + +void write2framebuffer(vec4 color, uvec2 id); void main() { - vec4 color = mainImage(f_uv * iResolution.xy); - if (color.a <= 0.0) discard; - fragment_color = color * 0.5; + vec4 color = mainImage(f_uv * iResolution.xy); + write2framebuffer(color, uvec2(objectid, 0)); }