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