1 | <HTML> |
---|
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
3 | <!-- Created on , 12 2006 by texi2html 1.64 --> |
---|
4 | <!-- |
---|
5 | Written 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. |
---|
9 | Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de> |
---|
10 | Send bugs and suggestions to <texi2html@mathematik.uni-kl.de> |
---|
11 | |
---|
12 | --> |
---|
13 | <HEAD> |
---|
14 | <TITLE>OGRE Manual v1.2.0 ('Dagon'): Compositor Techniques</TITLE> |
---|
15 | |
---|
16 | <META NAME="description" CONTENT="OGRE Manual v1.2.0 ('Dagon'): Compositor Techniques"> |
---|
17 | <META NAME="keywords" CONTENT="OGRE Manual v1.2.0 ('Dagon'): Compositor Techniques"> |
---|
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="SEC115"></A> |
---|
27 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> |
---|
28 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_21.html#SEC111"> < </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_23.html#SEC117"> > </A>]</TD> |
---|
31 | <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <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.1 Techniques </H3> |
---|
38 | <!--docid::SEC115::--> |
---|
39 | <P> |
---|
40 | |
---|
41 | A compositor technique is much like a <A HREF="manual_15.html#SEC31">material technique</A> in that it describes one approach to achieving the effect you're looking for. A compositor definition can have more than one technique if you wish to provide some fallback should the hardware not support the technique you'd prefer to use. Techniques are evaluated for hardware support based on 2 things: |
---|
42 | <DL COMPACT> |
---|
43 | <DT>Material support |
---|
44 | <DD>All <A HREF="manual_24.html#SEC124">passes</A> that render a fullscreen quad use a material; for the technique to be supported, all of the materials referenced must have at least one supported material technique. If they don't, the compositor technique is marked as unsupported and won't be used. |
---|
45 | <DT>Texture format support |
---|
46 | <DD>This one is slightly more complicated. When you request a <A HREF="manual_22.html#compositor_texture">texture</A> in your technique, you request a pixel format. Not all formats are natively supported by hardware, especially the floating point formats. However, in this case the hardware will typically downgrade the texture format requested to one that the hardware does support - with compositor effects though, you might want to use a different approach if this is the case. So, when evaluating techniques, the compositor will first look for native support for the exact pixel format you've asked for, and will skip onto the next technique if it is not supported, thus allowing you to define other techniques with simpler pixel formats which use a different approach. If it doesn't find any techniques which are natively supported, it tries again, this time allowing the hardware to downgrade the texture format and thus should find at least some support for what you've asked for. |
---|
47 | </DL> |
---|
48 | <P> |
---|
49 | |
---|
50 | As with material techniques, compositor techniques are evaluated in the order you define them in the script, so techniques declared first are preferred over those declared later. |
---|
51 | </P><P> |
---|
52 | |
---|
53 | Format: technique { }<BR><BR> |
---|
54 | </P><P> |
---|
55 | |
---|
56 | Techniques can have the following nested elements: |
---|
57 | <UL> |
---|
58 | <LI><A HREF="manual_22.html#compositor_texture">texture</A> |
---|
59 | <LI><A HREF="manual_23.html#SEC117">target</A> |
---|
60 | <LI><A HREF="manual_23.html#SEC117">target_output</A> |
---|
61 | </UL> |
---|
62 | <P> |
---|
63 | |
---|
64 | <A NAME="compositor_texture"></A> |
---|
65 | <A NAME="SEC116"></A> |
---|
66 | <H3> texture </H3> |
---|
67 | <!--docid::SEC116::--> |
---|
68 | <P> |
---|
69 | |
---|
70 | This declares a render texture for use in subsequent <A HREF="manual_23.html#SEC117">target passes</A>. |
---|
71 | </P><P> |
---|
72 | |
---|
73 | <BR><BR> |
---|
74 | Format: texture <Name> <Width> <Height> <Pixel Format><BR><BR> |
---|
75 | </P><P> |
---|
76 | |
---|
77 | Here is a description of the parameters: |
---|
78 | <DL COMPACT> |
---|
79 | <DT>Name |
---|
80 | <DD>A name to give the render texture, which must be unique within this compositor. This name is used to reference the texture in <A HREF="manual_23.html#SEC117">target passes</A>, when the texture is rendered to, and in <A HREF="manual_24.html#SEC124">passes</A>, when the texture is used as input to a material rendering a fullscreen quad. |
---|
81 | <DT>Width, Height |
---|
82 | <DD>The dimensions of the render texture. You can either specify a fixed width and height, or you can request that the texture matches the physical dimensions of the viewport to which the compositor is attached (specify target_width and target_height instead of numerical dimensions). |
---|
83 | <DT>Pixel Format |
---|
84 | <DD>The pixel format of the render texture. This affects how much memory it will take, what colour channels will be available, and what precision you will have within those channels. The available options are PF_A8R8G8B8, PF_R8G8B8A8, PF_R8G8B8, PF_FLOAT16_RGBA, PF_FLOAT16_RGB, PF_FLOAT16_R, PF_FLOAT32_RGBA, PF_FLOAT32_RGB, and PF_FLOAT32_R. |
---|
85 | </DL> |
---|
86 | <P> |
---|
87 | |
---|
88 | Example: texture rt0 512 512 PF_R8G8B8A8<BR> |
---|
89 | Example: texture rt1 target_width target_height PF_FLOAT32_RGB<BR><BR> |
---|
90 | </P><P> |
---|
91 | |
---|
92 | <A NAME="Compositor Target Passes"></A> |
---|
93 | <HR SIZE=1> |
---|
94 | <TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0> |
---|
95 | <TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_21.html#SEC111"> < </A>]</TD> |
---|
96 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_21.html#SEC111"> Up </A>]</TD> |
---|
97 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_23.html#SEC117"> > </A>]</TD> |
---|
98 | <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD> |
---|
99 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_toc.html#SEC_Contents">Contents</A>]</TD> |
---|
100 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[Index]</TD> |
---|
101 | <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="manual_abt.html#SEC_About"> ? </A>]</TD> |
---|
102 | </TR></TABLE> |
---|
103 | <BR> |
---|
104 | <FONT SIZE="-1"> |
---|
105 | This document was generated |
---|
106 | by <I>Steve Streeting</I> on <I>, 12 2006</I> |
---|
107 | using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html |
---|
108 | "><I>texi2html</I></A> |
---|
109 | |
---|
110 | </BODY> |
---|
111 | </HTML> |
---|