Erich Berger a écrit :
> hi chris,
>
> thx for your patience in the motion blur business :-) .
> it works well - but unfortunately its a motionblur in
> single buffering. but there is also another problem:
>
yes, and it's a problem for rendering complex objects.
So i don't think this solution solve all the problem.
Can you give an example of the problem with comples objects?
> unless i make something wrong it works for 2d but not 3d.
> only those pixels of the scene which have the same z-coordinate as the
> rectangle for the blur get blurred, the rest
> gets drawn like in single buffer mode
i think you also nead to clear deaph buffer (before drawing the rectangle).
Sorry, I forgot to mention the depth buffer clearing. I was using this patch:
#N canvas 417 23 824 714 10;
#X obj 261 44 gemhead;
#X obj 265 254 translateXYZ;
#X obj 265 334 rotateXYZ;
#X floatatom 323 276 5 0 0 0 - - -;
#X obj 491 73 gemhead;
#X obj 368 296 line;
#X msg 383 272 0 \, 360 5000;
#X obj 373 321 sel 360;
#X obj 36 152 gemwin;
#N canvas 245 99 680 638 iniciar 0;
#X msg 318 132 reset;
#X msg 234 281 create;
#X obj 218 77 inlet;
#X obj 218 107 t b b b b b b b;
#X msg 218 313 1;
#X obj 233 408 outlet;
#X msg 268 212 buffer 1;
#X msg 251 244 lighting 1;
#X msg 301 156 title FERRARI;
#X msg 284 184 dimen 320 240;
#X connect 0 0 5 0;
#X connect 1 0 5 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 3 1 1 0;
#X connect 3 2 7 0;
#X connect 3 3 6 0;
#X connect 3 4 9 0;
#X connect 3 5 8 0;
#X connect 3 6 0 0;
#X connect 4 0 5 0;
#X connect 6 0 5 0;
#X connect 7 0 5 0;
#X connect 8 0 5 0;
#X connect 9 0 5 0;
#X restore 36 101 pd iniciar;
#X msg 36 68 bang;
#X msg 45 126 destroy;
#X obj 320 11 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X floatatom 349 237 5 0 0 0 - - -;
#X floatatom 570 195 5 0 0 0 - - -;
#X floatatom 517 163 5 0 0 0 - - -;
#X floatatom 543 179 5 0 0 0 - - -;
#X obj 491 134 rotateXYZ;
#X obj 491 219 translateXYZ;
#X obj 491 289 world_light;
#X obj 265 155 colorRGB;
#X obj 277 95 / 360;
#X obj 293 119 expr 1-$f1;
#X msg 586 264 1 1 1;
#X msg 277 630 draw fill;
#X msg 515 264 debug 1;
#X obj 264 393 GEMglClearDepth;
#X obj 281 516 GEMglClear;
#X obj 382 448 GLdefine GL_DEPTH_BUFFER_BIT;
#X msg 365 365 1;
#X obj 265 665 rectangle 1.33 1;
#X obj 320 29 metro 20;
#X msg 382 420 bang;
#X msg 349 211 1;
#X msg 585 169 2;
#X floatatom 529 110 5 0 0 0 - - -;
#X obj 136 288 random 6;
#X obj 136 316 - 3;
#X obj 68 412 line;
#X obj 68 364 t f b;
#X obj 136 411 line;
#X obj 136 363 t f b;
#X obj 74 207 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X obj 68 261 random 8;
#X obj 68 289 - 4;
#X obj 474 32 loadbang;
#X text 77 79 begin now;
#X msg 116 133 bang;
#X floatatom 343 154 5 0 0 0 - - -;
#X obj 267 76 alpha;
#X obj 74 228 metro 1000;
#X msg 91 389 1000;
#X msg 164 388 1000;
#X obj 648 70 gemhead -1;
#X obj 648 131 alpha;
#X obj 650 248 rectangle 5.33 4;
#X floatatom 740 155 5 0 0 0 - - -;
#X obj 648 185 colorRGB 0 0 0 0.1;
#X msg 172 112 frame 100;
#X msg 157 80 frame 60;
#X msg 113 158 profile 1 \, fps;
#X floatatom 41 181 5 0 0 0 - - -;
#X msg 7 150 fps;
#X msg 110 31 dimen 1024 768;
#X msg 36 30 create \, 1;
#X connect 0 0 49 0;
#X connect 1 0 2 0;
#X connect 2 0 26 0;
#X connect 3 0 2 3;
#X connect 4 0 17 0;
#X connect 5 0 7 0;
#X connect 5 0 2 3;
#X connect 5 0 2 1;
#X connect 5 0 2 2;
#X connect 5 0 21 0;
#X connect 6 0 5 0;
#X connect 7 0 6 0;
#X connect 8 0 61 0;
#X connect 9 0 8 0;
#X connect 10 0 9 0;
#X connect 11 0 8 0;
#X connect 12 0 31 0;
#X connect 13 0 1 3;
#X connect 14 0 18 3;
#X connect 15 0 18 1;
#X connect 16 0 18 2;
#X connect 17 0 18 0;
#X connect 18 0 19 0;
#X connect 20 0 1 0;
#X connect 21 0 20 1;
#X connect 21 0 22 0;
#X connect 22 0 20 2;
#X connect 22 0 20 3;
#X connect 23 0 19 1;
#X connect 24 0 30 0;
#X connect 25 0 19 0;
#X connect 26 0 27 0;
#X connect 27 0 30 0;
#X connect 28 0 27 1;
#X connect 29 0 26 1;
#X connect 31 0 0 0;
#X connect 31 0 4 0;
#X connect 31 0 53 0;
#X connect 32 0 28 0;
#X connect 33 0 13 0;
#X connect 34 0 14 0;
#X connect 35 0 17 2;
#X connect 36 0 37 0;
#X connect 37 0 41 0;
#X connect 38 0 1 1;
#X connect 39 0 38 0;
#X connect 39 1 51 0;
#X connect 40 0 1 2;
#X connect 41 0 40 0;
#X connect 41 1 52 0;
#X connect 42 0 50 0;
#X connect 43 0 44 0;
#X connect 44 0 39 0;
#X connect 45 0 34 0;
#X connect 45 0 23 0;
#X connect 45 0 33 0;
#X connect 45 0 6 0;
#X connect 45 0 29 0;
#X connect 45 0 32 0;
#X connect 45 0 42 0;
#X connect 45 0 12 0;
#X connect 47 0 8 0;
#X connect 48 0 20 4;
#X connect 49 0 20 0;
#X connect 50 0 36 0;
#X connect 50 0 43 0;
#X connect 51 0 38 1;
#X connect 52 0 40 1;
#X connect 53 0 54 0;
#X connect 54 0 57 0;
#X connect 56 0 57 4;
#X connect 57 0 55 0;
#X connect 58 0 8 0;
#X connect 59 0 8 0;
#X connect 60 0 8 0;
#X connect 62 0 8 0;
#X connect 63 0 8 0;
#X connect 64 0 8 0;