[ < ] [ Up ] [ > ]               [Top] [Contents] [Index] [ ? ]

3.2.3 Compositor Passes

A pass is a single rendering action to be performed in a target pass.

Format: 'pass' (render_quad | clear | stencil | render_scene) { }

There are four types of pass:

clear
This kind of pass sets the contents of one or more buffers in the target to a fixed value. So this could clear the colour buffer to a fixed colour, set the depth buffer to a certain set of contents, fill the stencil buffer with a value, or any combination of the above.
stencil
This kind of pass configures stencil operations for the subsequent passes. It can set the stencil compare function, operations and reference values for you to perform your own stencil effects.
render_scene
This kind of pass performs a regular rendering of the scene. It will use the visibility_mask, lod_bias, and material_scheme from the parent target pass.
render_quad
This kind of pass renders a quad over the entire render target, using a given material. You will undoubtedly want to pull in the results of other target passes into this operation to perform fullscreen effects.

Here are the attributes you can use in a 'pass' section of a .compositor script:

Available Pass Attributes

material

For passes of type 'render_quad', sets the material used to render the quad. You will want to use shaders in this material to perform fullscreen effects, and use the input attribute to map other texture targets into the texture bindings needed by this material.

Format: material <Name>

input

For passes of type 'render_quad', this is how you map one or more local render textures (See compositor_texture) into the material you're using to render the fullscreen quad. To bind more than one texture, repeat this attribute with different sampler indexes.

Format: input <sampler> <Name>

sampler
The texture sampler to set, must be a number in the range [0, OGRE_MAX_TEXTURE_LAYERS-1].
Name
The name of the local render texture to bind, as declared in compositor_texture and rendered to in one or more target pass.
Example: input 0 rt0

first_render_queue

For passes of type 'render_scene', this sets the first render queue id that is included in the render. Defaults to the value of RENDER_QUEUE_SKIES_EARLY.

Format: first_render_queue <id>

Default: first_render_queue 5

last_render_queue

For passes of type 'render_scene', this sets the last render queue id that is included in the render. Defaults to the value of RENDER_QUEUE_SKIES_LATE.

Format: last_render_queue <id>

Default: last_render_queue 95

Clear Section

For passes of type 'clear', this section defines the buffer clearing parameters.

Format: clear { }

Here are the attributes you can use in a 'clear' section of a .compositor script:

Stencil Section

For passes of type 'stencil', this section defines the stencil operation parameters.

Format: stencil { }

Here are the attributes you can use in a 'stencil' section of a .compositor script:


[ < ] [ Up ] [ > ]               [Top] [Contents] [Index] [ ? ]

This document was generated by Steve Streeting on , 12 2006 using texi2html