source: OGRE/trunk/ogrenew/Docs/manual/manual_24.html @ 692

Revision 692, 13.8 KB checked in by mattausch, 19 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1<HTML>
2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
3<!-- Created on , 12 2006 by texi2html 1.64 -->
4<!--
5Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
6            Karl Berry  <karl@freefriends.org>
7            Olaf Bachmann <obachman@mathematik.uni-kl.de>
8            and many others.
9Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
10Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
11 
12-->
13<HEAD>
14<TITLE>OGRE Manual v1.2.0 ('Dagon'): Compositor Passes</TITLE>
15
16<META NAME="description" CONTENT="OGRE Manual v1.2.0 ('Dagon'): Compositor Passes">
17<META NAME="keywords" CONTENT="OGRE Manual v1.2.0 ('Dagon'): Compositor Passes">
18<META NAME="resource-type" CONTENT="document">
19<META NAME="distribution" CONTENT="global">
20<META NAME="Generator" CONTENT="texi2html 1.64">
21<LINK TYPE="text/css" rel="stylesheet" href="../style.css"> 
22</HEAD>
23
24<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
25
26<A NAME="SEC124"></A>
27<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
28<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_23.html#SEC117"> &lt; </A>]</TD>
29<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_21.html#SEC111"> Up </A>]</TD>
30<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_25.html#SEC144"> &gt; </A>]</TD>
31<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
32<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
33<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
34<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
35</TR></TABLE>
36<HR SIZE=1>
37<H3> 3.2.3 Compositor Passes </H3>
38<!--docid::SEC124::-->
39<P>
40
41A pass is a single rendering action to be performed in a target pass. <BR><BR>
42Format: 'pass' (render_quad | clear | stencil | render_scene) { }<BR><BR>
43</P><P>
44
45There are four types of pass:
46<DL COMPACT>
47<DT>clear
48<DD>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.
49<DT>stencil
50<DD>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.
51<DT>render_scene
52<DD>This kind of pass performs a regular rendering of the scene. It will use the <A HREF="manual_23.html#SEC121">visibility_mask</A>, <A HREF="manual_23.html#compositor_lod_bias">lod_bias</A>, and <A HREF="manual_23.html#SEC123">material_scheme</A> from the parent target pass.
53<DT>render_quad
54<DD>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.
55</DL>
56<P>
57
58Here are the attributes you can use in a 'pass' section of a .compositor script:
59</P><P>
60
61<A NAME="SEC125"></A>
62<H2> Available Pass Attributes </H2>
63<!--docid::SEC125::-->
64<UL>
65<LI>
66<A HREF="manual_24.html#SEC126">material</A>
67<LI>
68<A HREF="manual_24.html#compositor_pass_input">input</A>
69<LI>
70<A HREF="manual_24.html#SEC128">first_render_queue</A>
71<LI>
72<A HREF="manual_24.html#SEC129">last_render_queue</A>
73<LI>
74<A HREF="manual_24.html#compositor_clear">clear</A>
75<LI>
76<A HREF="manual_24.html#compositor_stencil">stencil</A>
77</UL>
78<P>
79
80<A NAME="material"></A>
81<A NAME="SEC126"></A>
82<H3> material </H3>
83<!--docid::SEC126::-->
84For 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 <A HREF="manual_24.html#compositor_pass_input">input</A> attribute to map other texture targets into the texture bindings needed by this material.<BR><BR>
85Format: material &#60;Name&#62;<BR><BR>
86<P>
87
88<A NAME="compositor_pass_input"></A>
89<A NAME="SEC127"></A>
90<H3> input  </H3>
91<!--docid::SEC127::-->
92For passes of type 'render_quad', this is how you map one or more local render textures (See  <A HREF="manual_22.html#compositor_texture">compositor_texture</A>) into the material you're using to render the fullscreen quad. To bind more than one texture, repeat this attribute with different sampler indexes.<BR><BR>
93Format: input &#60;sampler&#62; &#60;Name&#62;<BR><BR>
94<DL COMPACT>
95<DT>sampler
96<DD>The texture sampler to set, must be a number in the range [0, OGRE_MAX_TEXTURE_LAYERS-1].
97<DT>Name
98<DD>The name of the local render texture to bind, as declared in <A HREF="manual_22.html#compositor_texture">compositor_texture</A> and rendered to in one or more <A HREF="manual_23.html#SEC117">target pass</A>.
99</DL>
100Example: input 0 rt0
101<P>
102
103<A NAME="first_render_queue"></A>
104<A NAME="SEC128"></A>
105<H3> first_render_queue </H3>
106<!--docid::SEC128::-->
107For 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.<BR><BR>
108Format: first_render_queue &#60;id&#62;<BR><BR>
109Default: first_render_queue 5<BR><BR>
110<P>
111
112<A NAME="last_render_queue"></A>
113<A NAME="SEC129"></A>
114<H3> last_render_queue </H3>
115<!--docid::SEC129::-->
116For 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.<BR><BR>
117Format: last_render_queue &#60;id&#62;<BR><BR>
118Default: last_render_queue 95
119<P>
120
121<A NAME="compositor_clear"></A>
122<A NAME="SEC130"></A>
123<H2> Clear Section </H2>
124<!--docid::SEC130::-->
125For passes of type 'clear', this section defines the buffer clearing parameters. <BR><BR>
126Format: clear { }<BR><BR>
127<P>
128
129Here are the attributes you can use in a 'clear' section of a .compositor script:
130<UL>
131<LI>
132<A HREF="manual_24.html#compositor_clear_buffers">buffers</A>
133<LI>
134<A HREF="manual_24.html#compositor_clear_colour_value">colour_value</A>
135<LI>
136<A HREF="manual_24.html#compositor_clear_depth_value">depth_value</A>
137<LI>
138<A HREF="manual_24.html#compositor_clear_stencil_value">stencil_value</A>
139<P>
140
141<A NAME="compositor_clear_buffers"></A>
142<A NAME="SEC131"></A>
143<H3> buffers </H3>
144<!--docid::SEC131::-->
145Sets the buffers cleared by this pass.<BR><BR>
146<P>
147
148Format: buffers [colour] [depth] [stencil]<BR><BR>
149Default: buffers colour depth<BR><BR>
150</P><P>
151
152<A NAME="compositor_clear_colour_value"></A>
153<A NAME="SEC132"></A>
154<H3> colour_value </H3>
155<!--docid::SEC132::-->
156Set the colour used to fill the colour buffer by this pass, if the colour buffer is being cleared (<A HREF="manual_24.html#compositor_clear_buffers">buffers</A>). <BR><BR>
157Format: colour_value &#60;red&#62; &#60;green&#62; &#60;blue&#62; &#60;alpha&#62;<BR><BR>
158Default: colour_value 0 0 0 0<BR><BR>
159<P>
160
161<A NAME="compositor_clear_depth_value"></A>
162<A NAME="SEC133"></A>
163<H3> depth_value </H3>
164<!--docid::SEC133::-->
165Set the depth value used to fill the depth buffer by this pass, if the depth buffer is being cleared (<A HREF="manual_24.html#compositor_clear_buffers">buffers</A>). <BR><BR>
166Format: depth_value &#60;depth&#62;<BR><BR>
167Default: depth_value 1.0<BR><BR>
168<P>
169
170<A NAME="compositor_clear_stencil_value"></A>
171<A NAME="SEC134"></A>
172<H3> stencil_value </H3>
173<!--docid::SEC134::-->
174Set the stencil value used to fill the stencil buffer by this pass, if the stencil buffer is being cleared (<A HREF="manual_24.html#compositor_clear_buffers">buffers</A>). <BR><BR>
175Format: stencil_value &#60;value&#62;<BR><BR>
176Default: stencil_value 0.0<BR><BR>
177</UL>
178
179<A NAME="compositor_stencil"></A>
180<A NAME="SEC135"></A>
181<H2> Stencil Section </H2>
182<!--docid::SEC135::-->
183For passes of type 'stencil', this section defines the stencil operation parameters. <BR><BR>
184<P>
185
186Format: stencil { }<BR><BR>
187</P><P>
188
189Here are the attributes you can use in a 'stencil' section of a .compositor script:
190</P><P>
191
192<UL>
193<LI>
194<A HREF="manual_24.html#compositor_stencil_check">check</A>
195<LI>
196<A HREF="manual_24.html#compositor_stencil_comp_func">comp_func</A>
197<LI>
198<A HREF="manual_24.html#compositor_stencil_ref_value">ref_value</A>
199<LI>
200<A HREF="manual_24.html#compositor_stencil_mask">mask</A>
201<LI>
202<A HREF="manual_24.html#compositor_stencil_fail_op">fail_op</A>
203<LI>
204<A HREF="manual_24.html#compositor_stencil_depth_fail_op">depth_fail_op</A>
205<LI>
206<A HREF="manual_24.html#compositor_stencil_pass_op">pass_op</A>
207<LI>
208<A HREF="manual_24.html#compositor_stencil_two_sided">two_sided</A>
209<P>
210
211<A NAME="compositor_stencil_check"></A>
212<A NAME="SEC136"></A>
213<H3> check </H3>
214<!--docid::SEC136::-->
215Enables or disables the stencil check, thus enabling the use of the rest of the features in this section. The rest of the options in this section do nothing if the stencil check is off.
216Format: check (on | off)<BR><BR>
217<P>
218
219<A NAME="compositor_stencil_comp_func"></A>
220<A NAME="SEC137"></A>
221<H3> comp_func </H3>
222<!--docid::SEC137::-->
223Sets the function used to perform the following comparison:<BR><BR>
224(ref_value &#38; mask) comp_func (Stencil Buffer Value &#38; mask)<BR><BR>
225<P>
226
227What happens as a result of this comparison will be one of 3 actions on the stencil buffer, depending on whether the test fails, succeeds but with the depth buffer check still failing, or succeeds with the depth buffer check passing too. You set the actions in the <A HREF="manual_24.html#compositor_stencil_fail_op">fail_op</A>, <A HREF="manual_24.html#compositor_stencil_depth_fail_op">depth_fail_op</A> and <A HREF="manual_24.html#compositor_stencil_pass_op">pass_op</A> respectively. If the stencil check fails, no colour or depth are written to the frame buffer.<BR><BR>
228Format: comp_func (always_fail | always_pass | less | less_equal | not_equal | greater_equal | greater)<BR><BR>
229Default: comp_func always_pass<BR><BR>
230</P><P>
231
232<A NAME="compositor_stencil_ref_value"></A>
233<A NAME="SEC138"></A>
234<H3> ref_value </H3>
235<!--docid::SEC138::-->
236Sets the reference value used to compare with the stencil buffer as described in <A HREF="manual_24.html#compositor_stencil_comp_func">comp_func</A>.<BR><BR>
237Format: ref_value &#60;value&#62;<BR><BR>
238Default: ref_value 0.0<BR><BR>
239<P>
240
241<A NAME="compositor_stencil_mask"></A>
242<A NAME="SEC139"></A>
243<H3> mask </H3>
244<!--docid::SEC139::-->
245Sets the mask used to compare with the stencil buffer as described in <A HREF="manual_24.html#compositor_stencil_comp_func">comp_func</A>.<BR><BR>
246Format: mask &#60;value&#62;<BR><BR>
247Default: mask 4294967295<BR><BR>
248<P>
249
250<A NAME="compositor_stencil_fail_op"></A>
251<A NAME="SEC140"></A>
252<H3> fail_op </H3>
253<!--docid::SEC140::-->
254Sets what to do with the stencil buffer value if the result of the stencil comparison (<A HREF="manual_24.html#compositor_stencil_comp_func">comp_func</A>) and depth comparison is that both fail.<BR><BR>
255Format: fail_op (keep | zero | replace | increment | decrement | increment_wrap | decrement_wrap | invert)<BR><BR>
256Default: depth_fail_op keep<BR><BR>
257These actions mean:
258<DL COMPACT>
259<DT>keep
260<DD>Leave the stencil buffer unchanged.
261<DT>zero
262<DD>Set the stencil value to zero.
263<DT>replace
264<DD>Set the stencil value to the reference value.
265<DT>increment
266<DD>Add one to the stencil value, clamping at the maximum value.
267<DT>decrement
268<DD>Subtract one from the stencil value, clamping at 0.
269<DT>increment_wrap
270<DD>Add one to the stencil value, wrapping back to 0 at the maximum.
271<DT>decrement_wrap
272<DD>Subtract one from the stencil value, wrapping to the maximum below 0.
273<DT>invert
274<DD>invert the stencil value.
275</DL>
276<P>
277
278<A NAME="compositor_stencil_depth_fail_op"></A>
279<A NAME="SEC141"></A>
280<H3> depth_fail_op </H3>
281<!--docid::SEC141::-->
282Sets what to do with the stencil buffer value if the result of the stencil comparison (<A HREF="manual_24.html#compositor_stencil_comp_func">comp_func</A>) passes but the depth comparison fails. <BR><BR>
283<P>
284
285Format: depth_fail_op (keep | zero | replace | increment | decrement | increment_wrap | decrement_wrap | invert)<BR><BR>
286Default: depth_fail_op keep<BR><BR>
287</P><P>
288
289<A NAME="compositor_stencil_pass_op"></A>
290<A NAME="SEC142"></A>
291<H3> pass_op </H3>
292<!--docid::SEC142::-->
293Sets what to do with the stencil buffer value if the result of the stencil comparison (<A HREF="manual_24.html#compositor_stencil_comp_func">comp_func</A>) and the depth comparison pass. <BR><BR>
294Format: pass_op (keep | zero | replace | increment | decrement | increment_wrap | decrement_wrap | invert)<BR><BR>
295Default: pass_op keep<BR><BR>
296<P>
297
298<A NAME="compositor_stencil_two_sided"></A>
299<A NAME="SEC143"></A>
300<H3> two_sided </H3>
301<!--docid::SEC143::-->
302Enables or disables two-sided stencil operations, which means the inverse of the operations applies to back-facing polygons.<BR><BR>
303Format: two_sided (on | off)<BR><BR>
304Default: two_sided off<BR><BR>
305</UL>
306
307<A NAME="Applying a Compositor"></A>
308<HR SIZE=1>
309<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
310<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_23.html#SEC117"> &lt; </A>]</TD>
311<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_21.html#SEC111"> Up </A>]</TD>
312<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_25.html#SEC144"> &gt; </A>]</TD>
313<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
314<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD>
315<TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD>
316<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD>
317</TR></TABLE>
318<BR> 
319<FONT SIZE="-1">
320This document was generated
321by <I>Steve Streeting</I> on <I>, 12 2006</I>
322using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
323"><I>texi2html</I></A>
324
325</BODY>
326</HTML>
Note: See TracBrowser for help on using the repository browser.