The compositing graph is a system for automating and simplifying multipass rendering. A compositing node is an object that sates which shader program should be used durring, what texture variables it may set, and defines a function which contains the drawing code.
The texture properties of a compositing node may be either a URI string denoting an image file, or it can be another compositing node instance. In the later case, a texture will be generated automatically by rendering the child node to a texture before rendering the parent.
The compositing graph is able to solve the correct order in which nodes should be drawn, and so drawing a scene is a singular function call:
please.render(some_compositing_node);
please.RenderNode (shader_program)
This constructor function creates a compositing node. The ‘shader_program’ argument is either the name of a compiled shader program or a shader program object. RenderNodes have the following properties and methods:
please.set_viewport (render_node)
Designate a particular RenderNode to be the rendering output. You can pass null to disable this mechanism if you want to override m.grl’s rendering management system, which you probably don’t want to do.
please.indirect_render (node)
Renders the compositing tree, always into indirect buffers. Nothing is drawn on screen by this function.
please.TransitionEffect (shader_program)
TransitionEffect nodes are RenderNodes with some different defaults. They are used to blend between two different RenderNodes.
TransitionEffects differ from RenderNodes in the following ways:
TransitionEffect nodes also define the following: