This command creates a new effect composer object from the specified source. The returned composer object can be applied to any <node3d> object to enable automatic shader composition.
code = """
Composer {
Vertex {
BEGIN
void main()
{
vec4 eyeVertex = gl_ModelViewMatrix * gl_Vertex;
gl_Position = gl_ProjectionMatrix * eyeVertex;
}
END
}
Fragment {
BEGIN
void main()
{
vec4 color = vec4(0.0,0.0,0.0,1.0);
<ComputeColor>
gl_FragColor = color;
}
END
}
}
"""
composer = viz.addEffectComposer(code)