Compositor Target Passes
From Multiverse
Contents |
Overview
A compositor target pass is the action of rendering to a given target, either a render texture or the final output. You can update the same render texture multiple times by adding more than one target pass to your compositor script - this is very useful for 'ping pong' renders between a couple of render textures to perform complex convolutions that cannot be done in a single render, such as blurring.
There are two types of target pass:
-
target, that updates a render texture. -
target_output, that defines the final output render
First format:
target Name { }
Second format:
target_output { }
The contents of both are identical. The only real difference is that
you can only have a single target_output entry, while you can have
many target entries.
Attributes
The attributes of a 'target' or 'target_output' section of a .compositor script are:
input
Sets input mode of the target, which tells the target pass what is pulled in before any of its own passes are rendered.
Format:
input (none | previous)
Default:
input none
Valid values:
- none
- The target will have nothing as input, all the contents of the
target must be generated using its own passes. Note this does not mean the target will be empty, just no data will be pulled in. For it to truly be blank you'd need a 'clear' pass within this target.
- previous
- The target will pull in the previous contents of the viewport.
This will be either the original scene if this is the first compositor in the chain, or it will be the output from the previous compositor in the chain if the viewport has multiple compositors enabled.
lod_bias
Set the scene LOD bias for any render_scene passes performed in this target pass. The default is 1.0, everything below that means lower quality, higher means higher quality.
Format:
lod_bias lodbias
Default:
lod_bias 1.0
material_scheme
Set the material scheme for any render_scene passes performed in this target pass. Material schemes allow you to select alternative rendering paths for all objects in the scene.
Format:
material_scheme Name
Default:
material_scheme Default
only_initial
If set to on, this target pass will only execute once initially after the effect has been enabled. This could be useful to perform once-off renders, after which the static contents are used by the rest of the compositor.
Format:
only_initial (on | off)
Default:
only_initial off
visibility_mask
Sets the visibility mask for any render_scene passes performed in this target pass. This is a bitmask (although it must be specified as decimal, not hex) and maps to SceneManager::setVisibilityMask.
Format:
visibility_mask mask
Default:
visibility_mask 4294967295
This document is based on the OGRE Manual and is licensed under the Creative Commons Attribution-ShareAlike 2.5 License.
