osgPPU Units

Each unit can be understood as a black box with n inputs and m outputs. The input and the output is represented by a texture. A shader can be applied to a unit to be used for computing the output. Other Units are bound as inputs. A shader can be used to compute the output results based on the input data.

Output textures can be used by the associated shader program to write the output to. You can use multiple output textures if your GPU does support MRT (multiple rendering targets). The output textures can either be reused as input again (e.g. for Motion Blur effect) or used in any other place of your rendering application.

Mipmapping is supported either by a hardware mipmap generation on the output texture or by using the shader associated with a Unit. The shader is responsible for computing the data of the current mipmap level from the previous one.

In general osgPPU can be also used for non-rendering task, e.g. to compute procedural textures or to perform offscreen computation on some dataset.

Supported Units

  • Unit - base class providing basing properties of any unit
  • UnitBypass? - default bypass unit (no rendering)
  • UnitDepthbufferBypass? - bypass the depth buffer attachment of the camera to the output (no rendering)
  • UnitTexture? - pass any external texture to the output texture (no rendering)
  • UnitOut? - pass input textures to the frame buffer (can be used to display results on the screen)
  • UnitOutCapture? - pass input textures to a file (often used to capture renderings in higher resolution than monitor supports)
  • UnitInOut? - pass input to the output
  • UnitInResampleOut? - pass input to the output by scaling the input texture
  • UnitInMipmapOut? - pass input to the output by computing the mipmap on the output texture
  • UnitMipmapInMipmapOut? - pass mipmapped input to the mipmapped output
  • UnitText? - pass input to the output and print some texture message on the output texture
  • UnitInOutModule? - bring some external processing code through a module into the pipeline
  • UnitCamera? - pass some camera into the pipeline
  • UnitCameraAttachmentBypass? - use camera attachments (color buffer, depth buffer, ...) as inputs to the pipeline