[5312] | 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 |
---|
[7883] | 8 | texture rt_output target_width target_height PF_R8G8B8 |
---|
| 9 | texture rt0 128 128 PF_R8G8B8 |
---|
| 10 | texture rt1 128 128 PF_R8G8B8 |
---|
[5312] | 11 | |
---|
[7883] | 12 | target rt_output |
---|
[5312] | 13 | { |
---|
| 14 | // Render output from previous compositor (or original scene) |
---|
| 15 | input previous |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | target rt0 |
---|
| 19 | { |
---|
| 20 | // Start with clear texture |
---|
| 21 | input none |
---|
| 22 | // Vertical blur pass |
---|
| 23 | pass render_quad |
---|
| 24 | { |
---|
| 25 | // Renders a fullscreen quad with a material |
---|
| 26 | material Ogre/Compositor/Blur0 |
---|
[7883] | 27 | input 0 rt_output |
---|
[5312] | 28 | } |
---|
| 29 | } |
---|
| 30 | |
---|
| 31 | target rt1 |
---|
| 32 | { |
---|
| 33 | // Start with clear texture |
---|
| 34 | input none |
---|
| 35 | // Horizontal blur pass |
---|
| 36 | pass render_quad |
---|
| 37 | { |
---|
| 38 | // Renders a fullscreen quad with a material |
---|
| 39 | material Ogre/Compositor/Blur1 |
---|
| 40 | input 0 rt0 |
---|
| 41 | } |
---|
| 42 | } |
---|
| 43 | |
---|
| 44 | target_output |
---|
| 45 | { |
---|
| 46 | // Start with clear output |
---|
[7883] | 47 | input none |
---|
[5312] | 48 | // Draw a fullscreen quad |
---|
| 49 | pass render_quad |
---|
| 50 | { |
---|
| 51 | // Renders a fullscreen quad with a material |
---|
| 52 | material Ogre/Compositor/BloomBlend |
---|
[7883] | 53 | input 0 rt_output |
---|
| 54 | input 1 rt1 |
---|
[5312] | 55 | } |
---|
| 56 | } |
---|
| 57 | } |
---|
| 58 | } |
---|
| 59 | |
---|
| 60 | compositor Glass |
---|
| 61 | { |
---|
| 62 | technique |
---|
| 63 | { |
---|
| 64 | texture rt0 target_width target_height PF_R8G8B8 |
---|
| 65 | |
---|
| 66 | target rt0 { input previous } |
---|
| 67 | |
---|
| 68 | target_output |
---|
| 69 | { |
---|
| 70 | // Start with clear output |
---|
| 71 | input none |
---|
| 72 | |
---|
| 73 | pass render_quad |
---|
| 74 | { |
---|
| 75 | material Ogre/Compositor/GlassPass |
---|
| 76 | input 0 rt0 |
---|
| 77 | } |
---|
| 78 | } |
---|
| 79 | } |
---|
| 80 | } |
---|
| 81 | |
---|
| 82 | // Black and white effect |
---|
| 83 | compositor BW |
---|
| 84 | { |
---|
| 85 | technique |
---|
| 86 | { |
---|
| 87 | // Temporary textures |
---|
| 88 | texture rt0 target_width target_height PF_A8R8G8B8 |
---|
| 89 | |
---|
| 90 | target rt0 |
---|
| 91 | { |
---|
| 92 | // Render output from previous compositor (or original scene) |
---|
| 93 | input previous |
---|
| 94 | } |
---|
| 95 | |
---|
| 96 | target_output |
---|
| 97 | { |
---|
| 98 | // Start with clear output |
---|
| 99 | input none |
---|
| 100 | // Draw a fullscreen quad with the black and white image |
---|
| 101 | pass render_quad |
---|
| 102 | { |
---|
| 103 | // Renders a fullscreen quad with a material |
---|
| 104 | material Ogre/Compositor/BlackAndWhite |
---|
| 105 | input 0 rt0 |
---|
| 106 | } |
---|
| 107 | } |
---|
| 108 | } |
---|
| 109 | } |
---|
| 110 | |
---|
| 111 | compositor Tiling |
---|
| 112 | { |
---|
| 113 | technique |
---|
| 114 | { |
---|
| 115 | // Temporary textures |
---|
| 116 | texture rt0 target_width target_height PF_A8R8G8B8 |
---|
| 117 | |
---|
| 118 | target rt0 |
---|
| 119 | { |
---|
| 120 | // Render output from previous compositor (or original scene) |
---|
| 121 | input previous |
---|
| 122 | } |
---|
| 123 | |
---|
| 124 | target_output |
---|
| 125 | { |
---|
| 126 | // Start with clear output |
---|
| 127 | input none |
---|
| 128 | // Draw a fullscreen quad with the black and white image |
---|
| 129 | pass render_quad |
---|
| 130 | { |
---|
| 131 | // Renders a fullscreen quad with a material |
---|
| 132 | material Ogre/Compositor/Tiling |
---|
| 133 | input 0 rt0 |
---|
| 134 | } |
---|
| 135 | } |
---|
| 136 | } |
---|
| 137 | } |
---|
| 138 | |
---|
| 139 | // Embossed (fake bump) effect |
---|
| 140 | compositor Embossed |
---|
| 141 | { |
---|
| 142 | technique |
---|
| 143 | { |
---|
| 144 | // Temporary textures |
---|
| 145 | texture rt0 target_width target_height PF_A8R8G8B8 |
---|
| 146 | |
---|
| 147 | target rt0 |
---|
| 148 | { |
---|
| 149 | // Render output from previous compositor (or original scene) |
---|
| 150 | input previous |
---|
| 151 | } |
---|
| 152 | |
---|
| 153 | target_output |
---|
| 154 | { |
---|
| 155 | // Start with clear output |
---|
| 156 | input none |
---|
| 157 | // Draw a fullscreen quad with the black and white image |
---|
| 158 | pass render_quad |
---|
| 159 | { |
---|
| 160 | // Renders a fullscreen quad with a material |
---|
| 161 | material Ogre/Compositor/Embossed |
---|
| 162 | input 0 rt0 |
---|
| 163 | } |
---|
| 164 | } |
---|
| 165 | } |
---|
| 166 | } |
---|
| 167 | |
---|
[6163] | 168 | compositor "Sharpen Edges" |
---|
[5312] | 169 | { |
---|
| 170 | technique |
---|
| 171 | { |
---|
| 172 | // Temporary textures |
---|
| 173 | texture rt0 target_width target_height PF_A8R8G8B8 |
---|
| 174 | |
---|
| 175 | target rt0 |
---|
| 176 | { |
---|
| 177 | // Render output from previous compositor (or original scene) |
---|
| 178 | input previous |
---|
| 179 | } |
---|
| 180 | |
---|
| 181 | target_output |
---|
| 182 | { |
---|
| 183 | // Start with clear output |
---|
| 184 | input none |
---|
| 185 | // Draw a fullscreen quad with the black and white image |
---|
| 186 | pass render_quad |
---|
| 187 | { |
---|
| 188 | // Renders a fullscreen quad with a material |
---|
| 189 | material Ogre/Compositor/SharpenEdges |
---|
| 190 | input 0 rt0 |
---|
| 191 | } |
---|
| 192 | } |
---|
| 193 | } |
---|
| 194 | } |
---|
| 195 | |
---|
| 196 | compositor Invert |
---|
| 197 | { |
---|
| 198 | technique |
---|
| 199 | { |
---|
| 200 | // Temporary textures |
---|
| 201 | texture rt0 target_width target_height PF_A8R8G8B8 |
---|
| 202 | |
---|
| 203 | target rt0 |
---|
| 204 | { |
---|
| 205 | // Render output from previous compositor (or original scene) |
---|
| 206 | input previous |
---|
| 207 | } |
---|
| 208 | |
---|
| 209 | target_output |
---|
| 210 | { |
---|
| 211 | // Start with clear output |
---|
| 212 | input none |
---|
| 213 | // Draw a fullscreen quad with the black and white image |
---|
| 214 | pass render_quad |
---|
| 215 | { |
---|
| 216 | // Renders a fullscreen quad with a material |
---|
| 217 | material Ogre/Compositor/Invert |
---|
| 218 | input 0 rt0 |
---|
| 219 | } |
---|
| 220 | } |
---|
| 221 | } |
---|
| 222 | } |
---|
| 223 | |
---|
| 224 | compositor Posterize |
---|
| 225 | { |
---|
| 226 | technique |
---|
| 227 | { |
---|
| 228 | // Temporary textures |
---|
| 229 | texture rt0 target_width target_height PF_A8R8G8B8 |
---|
| 230 | |
---|
| 231 | target rt0 |
---|
| 232 | { |
---|
| 233 | // Render output from previous compositor (or original scene) |
---|
| 234 | input previous |
---|
| 235 | } |
---|
| 236 | |
---|
| 237 | target_output |
---|
| 238 | { |
---|
| 239 | // Start with clear output |
---|
| 240 | input none |
---|
| 241 | // Draw a fullscreen quad with the black and white image |
---|
| 242 | pass render_quad |
---|
| 243 | { |
---|
| 244 | // Renders a fullscreen quad with a material |
---|
| 245 | material Ogre/Compositor/Posterize |
---|
| 246 | input 0 rt0 |
---|
| 247 | } |
---|
| 248 | } |
---|
| 249 | } |
---|
| 250 | } |
---|
| 251 | |
---|
| 252 | compositor Laplace |
---|
| 253 | { |
---|
| 254 | technique |
---|
| 255 | { |
---|
| 256 | // Temporary textures |
---|
| 257 | texture rt0 target_width target_height PF_A8R8G8B8 |
---|
| 258 | |
---|
| 259 | target rt0 |
---|
| 260 | { |
---|
| 261 | // Render output from previous compositor (or original scene) |
---|
| 262 | input previous |
---|
| 263 | } |
---|
| 264 | |
---|
| 265 | target_output |
---|
| 266 | { |
---|
| 267 | // Start with clear output |
---|
| 268 | input none |
---|
| 269 | // Draw a fullscreen quad with the black and white image |
---|
| 270 | pass render_quad |
---|
| 271 | { |
---|
| 272 | // Renders a fullscreen quad with a material |
---|
| 273 | material Ogre/Compositor/Laplace |
---|
| 274 | input 0 rt0 |
---|
| 275 | } |
---|
| 276 | } |
---|
| 277 | } |
---|
| 278 | } |
---|
| 279 | |
---|
| 280 | compositor "Old TV" |
---|
| 281 | { |
---|
| 282 | technique |
---|
| 283 | { |
---|
| 284 | texture rt0 target_width target_height PF_R8G8B8 |
---|
| 285 | |
---|
| 286 | // render scene to a texture |
---|
| 287 | target rt0 { input previous } |
---|
| 288 | |
---|
| 289 | target_output |
---|
| 290 | { |
---|
| 291 | // Start with clear output |
---|
| 292 | input none |
---|
| 293 | |
---|
| 294 | pass render_quad |
---|
| 295 | { |
---|
| 296 | // convert the previous render target to a black and white image, add some noise, distort it, |
---|
| 297 | // then render to scene aligned quad |
---|
| 298 | material Ogre/Compositor/OldTV |
---|
| 299 | input 0 rt0 |
---|
| 300 | } |
---|
| 301 | } |
---|
| 302 | } |
---|
| 303 | } |
---|
| 304 | |
---|
[6163] | 305 | compositor "Old Movie" |
---|
[5312] | 306 | { |
---|
| 307 | technique |
---|
| 308 | { |
---|
| 309 | // Temporary textures |
---|
| 310 | texture rt0 target_width target_height PF_A8R8G8B8 |
---|
| 311 | |
---|
| 312 | target rt0 |
---|
| 313 | { |
---|
| 314 | // Render output from previous compositor (or original scene) |
---|
| 315 | input previous |
---|
| 316 | } |
---|
| 317 | |
---|
| 318 | target_output |
---|
| 319 | { |
---|
| 320 | // Start with clear output |
---|
| 321 | input none |
---|
| 322 | // Draw a fullscreen quad with the black and white image |
---|
| 323 | pass render_quad |
---|
| 324 | { |
---|
| 325 | // Renders a fullscreen quad with a material |
---|
| 326 | material Ogre/Compositor/OldMovie |
---|
| 327 | input 0 rt0 |
---|
| 328 | } |
---|
| 329 | } |
---|
| 330 | } |
---|
| 331 | } |
---|
| 332 | |
---|
[6163] | 333 | compositor "Gaussian Blur" |
---|
[5312] | 334 | { |
---|
| 335 | technique |
---|
| 336 | { |
---|
| 337 | // Temporary textures |
---|
| 338 | texture rt0 target_width target_height PF_A8R8G8B8 |
---|
| 339 | texture rt1 target_width target_height PF_A8R8G8B8 |
---|
| 340 | |
---|
| 341 | target rt0 |
---|
| 342 | { |
---|
| 343 | // Render output from previous compositor (or original scene) |
---|
| 344 | input previous |
---|
| 345 | } |
---|
| 346 | |
---|
| 347 | target rt1 |
---|
| 348 | { |
---|
| 349 | // Blur horizontally |
---|
| 350 | input none |
---|
| 351 | pass render_quad |
---|
| 352 | { |
---|
| 353 | material Ogre/Compositor/HDR/GaussianBloom |
---|
| 354 | input 0 rt0 |
---|
| 355 | identifier 700 |
---|
| 356 | } |
---|
| 357 | } |
---|
| 358 | |
---|
| 359 | target_output |
---|
| 360 | { |
---|
| 361 | // Start with clear output |
---|
| 362 | input none |
---|
| 363 | // Blur vertically |
---|
| 364 | pass render_quad |
---|
| 365 | { |
---|
| 366 | // Renders a fullscreen quad with a material |
---|
| 367 | material Ogre/Compositor/HDR/GaussianBloom |
---|
| 368 | input 0 rt1 |
---|
| 369 | identifier 701 |
---|
| 370 | } |
---|
| 371 | } |
---|
| 372 | } |
---|
| 373 | } |
---|
| 374 | |
---|
[6163] | 375 | compositor "Radial Blur" |
---|
[5312] | 376 | { |
---|
| 377 | technique |
---|
| 378 | { |
---|
| 379 | // Temporary textures |
---|
| 380 | texture rt0 target_width target_height PF_A8R8G8B8 |
---|
| 381 | |
---|
| 382 | target rt0 |
---|
| 383 | { |
---|
| 384 | // Render output from previous compositor (or original scene) |
---|
| 385 | input previous |
---|
| 386 | } |
---|
| 387 | |
---|
| 388 | target_output |
---|
| 389 | { |
---|
| 390 | // Start with clear output |
---|
| 391 | input none |
---|
| 392 | // Blur vertically |
---|
| 393 | pass render_quad |
---|
| 394 | { |
---|
| 395 | // Renders a fullscreen quad with a material |
---|
| 396 | material Ogre/Compositor/Radial_Blur |
---|
| 397 | input 0 rt0 |
---|
| 398 | } |
---|
| 399 | } |
---|
| 400 | } |
---|
| 401 | } |
---|