Uranium
Application Framework
Loading...
Searching...
No Matches
UM.View.CompositePass.CompositePass Class Reference

A RenderPass subclass providing the final composition render. More...

Inheritance diagram for UM.View.CompositePass.CompositePass:
UM.View.RenderPass.RenderPass

Public Member Functions

 __init__ (self, width, height)
 
"ShaderProgram" getCompositeShader (self)
 Get the shader currently used for compositing.
 
None setCompositeShader (self, "ShaderProgram" shader)
 Set the shader to use for compositing.
 
List[str] getLayerBindings (self)
 Get the current layer bindings.
 
None setLayerBindings (self, List[str] bindings)
 Set the layer bindings to use.
 
None render (self)
 Perform the actual rendering of the render pass.
 
- Public Member Functions inherited from UM.View.RenderPass.RenderPass
 __init__ (self, name, width, height, priority=0)
 
 getName (self)
 Get the name of this RenderPass.
 
 getSize (self)
 
 getPriority (self)
 Get the priority of this RenderPass.
 
 setSize (self, width, height)
 Set the size of this render pass.
 
 bind (self)
 Bind the render pass so it can be rendered to.
 
 release (self)
 Release the render pass.
 
 render (self)
 Render the contents of this render pass.
 
 getTextureId (self)
 Get the texture ID of this render pass so it can be reused by other passes.
 
 getOutput (self)
 Get the pixel data produced by this render pass.
 

Protected Attributes

 _shader
 
 _gl
 
 _renderer
 
 _layer_bindings
 
- Protected Attributes inherited from UM.View.RenderPass.RenderPass
 _name
 
 _width
 
 _height
 
 _priority
 
 _gl
 
 _fbo
 

Additional Inherited Members

- Static Public Attributes inherited from UM.View.RenderPass.RenderPass
int MaximumPriority = 999
 The maximum priority of a render pass.
 
- Protected Member Functions inherited from UM.View.RenderPass.RenderPass
 _updateRenderStorage (self)
 private:
 

Detailed Description

A RenderPass subclass providing the final composition render.

This render pass uses the other render passes to render a final composited image. By default, this consists of the output of the default pass, with an outline rendered on top of it using a convolution filter.

You can use setCompositeShader() to override the shader used for the composition. Additionally, setLayerBindings() can be used to set layer bindings, that is set, which layer is bound to which texture unit.

Note
The CompositePass should always be last in the Renderer's rendering order. Therefore, when subclassing RenderPass make sure to use a priority lower than RenderPass.MaximumPriority.

Constructor & Destructor Documentation

◆ __init__()

UM.View.CompositePass.CompositePass.__init__ (   self,
  width,
  height 
)

Reimplemented from UM.View.RenderPass.RenderPass.

Member Function Documentation

◆ render()

None UM.View.CompositePass.CompositePass.render (   self)

Perform the actual rendering of the render pass.

Reimplemented from UM.View.RenderPass.RenderPass.

◆ setLayerBindings()

None UM.View.CompositePass.CompositePass.setLayerBindings (   self,
List[str]  bindings 
)

Set the layer bindings to use.

This should be a list of RenderPass names. The passes will be bound to different texture units in the order specified. By default, the output of the "default" RenderPass is bound to texture unit 0 and the output of the "selection" RenderPass is bound to texture unit 1.

Parameters
bindingsThe list of layer bindings to use.

The documentation for this class was generated from the following file: