1 | // Manuel's bloom |
---|
2 | // Needs a scene-sized rtt, but does only one render of the scene |
---|
3 | compositor Bloom |
---|
4 | { |
---|
5 | technique |
---|
6 | { |
---|
7 | // Temporary textures |
---|
8 | texture rt0 128 128 PF_A8R8G8B8 |
---|
9 | texture rt1 128 128 PF_A8R8G8B8 |
---|
10 | |
---|
11 | target rt1 |
---|
12 | { |
---|
13 | // Render output from previous compositor (or original scene) |
---|
14 | input previous |
---|
15 | } |
---|
16 | |
---|
17 | target rt0 |
---|
18 | { |
---|
19 | // Start with clear texture |
---|
20 | input none |
---|
21 | // Vertical blur pass |
---|
22 | pass render_quad |
---|
23 | { |
---|
24 | // Renders a fullscreen quad with a material |
---|
25 | material Ogre/Compositor/Blur0 |
---|
26 | input 0 rt1 |
---|
27 | } |
---|
28 | } |
---|
29 | |
---|
30 | target rt1 |
---|
31 | { |
---|
32 | // Start with clear texture |
---|
33 | input none |
---|
34 | // Horizontal blur pass |
---|
35 | pass render_quad |
---|
36 | { |
---|
37 | // Renders a fullscreen quad with a material |
---|
38 | material Ogre/Compositor/Blur1 |
---|
39 | input 0 rt0 |
---|
40 | } |
---|
41 | } |
---|
42 | |
---|
43 | target_output |
---|
44 | { |
---|
45 | // Start with clear output |
---|
46 | input previous |
---|
47 | // Draw a fullscreen quad |
---|
48 | pass render_quad |
---|
49 | { |
---|
50 | // Renders a fullscreen quad with a material |
---|
51 | material Ogre/Compositor/BloomBlend |
---|
52 | input 0 rt1 |
---|
53 | } |
---|
54 | } |
---|
55 | } |
---|
56 | } |
---|
57 | |
---|
58 | compositor Glass |
---|
59 | { |
---|
60 | technique |
---|
61 | { |
---|
62 | texture rt0 target_width target_height PF_R8G8B8 |
---|
63 | |
---|
64 | target rt0 { input previous } |
---|
65 | |
---|
66 | target_output |
---|
67 | { |
---|
68 | // Start with clear output |
---|
69 | input none |
---|
70 | |
---|
71 | pass render_quad |
---|
72 | { |
---|
73 | material Ogre/Compositor/GlassPass |
---|
74 | input 0 rt0 |
---|
75 | } |
---|
76 | } |
---|
77 | } |
---|
78 | } |
---|
79 | |
---|
80 | compositor "Old TV" |
---|
81 | { |
---|
82 | technique |
---|
83 | { |
---|
84 | texture rt0 target_width target_height PF_R8G8B8 |
---|
85 | |
---|
86 | // render scene to a texture |
---|
87 | target rt0 { input previous } |
---|
88 | |
---|
89 | target_output |
---|
90 | { |
---|
91 | // Start with clear output |
---|
92 | input none |
---|
93 | |
---|
94 | pass render_quad |
---|
95 | { |
---|
96 | // convert the previous render target to a black and white image, add some noise, distort it, |
---|
97 | // then render to scene aligned quad |
---|
98 | material Ogre/Compositor/OldTV |
---|
99 | input 0 rt0 |
---|
100 | } |
---|
101 | } |
---|
102 | } |
---|
103 | } |
---|
104 | |
---|
105 | |
---|
106 | // Black and white effect |
---|
107 | compositor B&W |
---|
108 | { |
---|
109 | technique |
---|
110 | { |
---|
111 | // Temporary textures |
---|
112 | texture rt0 target_width target_height PF_A8R8G8B8 |
---|
113 | |
---|
114 | target rt0 |
---|
115 | { |
---|
116 | // Render output from previous compositor (or original scene) |
---|
117 | input previous |
---|
118 | } |
---|
119 | |
---|
120 | target_output |
---|
121 | { |
---|
122 | // Start with clear output |
---|
123 | input none |
---|
124 | // Draw a fullscreen quad with the black and white image |
---|
125 | pass render_quad |
---|
126 | { |
---|
127 | // Renders a fullscreen quad with a material |
---|
128 | material Ogre/Compositor/BlackAndWhite |
---|
129 | input 0 rt0 |
---|
130 | } |
---|
131 | } |
---|
132 | } |
---|
133 | } |
---|
134 | |
---|
135 | compositor DOF // based on Blur but final pass does depth of field |
---|
136 | { |
---|
137 | technique |
---|
138 | { |
---|
139 | // Temporary textures |
---|
140 | texture rt0 target_width target_height PF_A8R8G8B8 |
---|
141 | texture rt1 target_width target_height PF_A8R8G8B8 |
---|
142 | |
---|
143 | target rt1 |
---|
144 | { |
---|
145 | // Render output from previous compositor (or original scene) |
---|
146 | input previous |
---|
147 | } |
---|
148 | |
---|
149 | target rt0 |
---|
150 | { |
---|
151 | // Start with clear texture |
---|
152 | input none |
---|
153 | // Vertical blur pass |
---|
154 | pass render_quad |
---|
155 | { |
---|
156 | // Renders a fullscreen quad with a material |
---|
157 | material Ogre/Compositor/DOF_Blur0 |
---|
158 | input 0 rt1 |
---|
159 | } |
---|
160 | } |
---|
161 | |
---|
162 | target rt1 |
---|
163 | { |
---|
164 | // Start with clear texture |
---|
165 | input none |
---|
166 | // Horizontal blur pass |
---|
167 | pass render_quad |
---|
168 | { |
---|
169 | // Renders a fullscreen quad with a material |
---|
170 | material Ogre/Compositor/DOF_Blur1 |
---|
171 | input 0 rt0 |
---|
172 | } |
---|
173 | } |
---|
174 | |
---|
175 | target_output |
---|
176 | { |
---|
177 | // Start with clear output |
---|
178 | input none |
---|
179 | // Draw a fullscreen quad |
---|
180 | pass render_quad |
---|
181 | { |
---|
182 | // Renders a fullscreen quad with a material |
---|
183 | material Ogre/Compositor/DOF_Blend |
---|
184 | input 0 rt0 |
---|
185 | input 1 rt1 |
---|
186 | } |
---|
187 | } |
---|
188 | } |
---|
189 | } |
---|
190 | |
---|
191 | // Embossed (fake bump) effect |
---|
192 | compositor Embossed |
---|
193 | { |
---|
194 | technique |
---|
195 | { |
---|
196 | // Temporary textures |
---|
197 | texture rt0 target_width target_height PF_A8R8G8B8 |
---|
198 | |
---|
199 | target rt0 |
---|
200 | { |
---|
201 | // Render output from previous compositor (or original scene) |
---|
202 | input previous |
---|
203 | } |
---|
204 | |
---|
205 | target_output |
---|
206 | { |
---|
207 | // Start with clear output |
---|
208 | input none |
---|
209 | // Draw a fullscreen quad with the black and white image |
---|
210 | pass render_quad |
---|
211 | { |
---|
212 | // Renders a fullscreen quad with a material |
---|
213 | material Ogre/Compositor/Embossed |
---|
214 | input 0 rt0 |
---|
215 | } |
---|
216 | } |
---|
217 | } |
---|
218 | } |
---|