FastBlur for DarkBasic Pro. In my PC (AMD K7 1400Mhz = 74 frames per second)
This is a faked effect. I use a simple sprite and "render to texture" technique (set camera to image)
Rem Project: fastblur
Rem Created: 05/03/2005 12:10:34
Rem Por IceVAN/Purples Studios
Rem ***** Main Source File *****
set display mode 640,480,32
sync on
sync rate 0
`objetos que representa la escena 3D
make object cube 1,10
position object 1,-3,0,0
color object 1,rgb(255,0,0)
make object cube 2,10
position object 2,3,0,0
color object 2,rgb(0,255,0)
`creamos una camara nueva y hazemos que rederize en una imagen
make camera 1
position camera 1,0,0,-20
set camera to image 1,1,512,512
color backdrop 1,rgb(0,0,0)
`alejamos la camara 0 del centro del universo 3D.
position camera 0,1000000,0,0
color backdrop 0,rgb(0,0,0)
`sprite para realizar el desenfoque. la imagen del sprite es el render de la camara 1
sprite 1,0,30,1
size sprite 1,640,480
do
rotate object 1,object angle x(1)+1,object angle y(1)+1,object angle z(1)
rotate object 2,object angle x(2)-1,object angle y(2),object angle z(2)-1
if spacekey()=1
`realizamos el desenfoque
set sprite alpha 1,128
paste sprite 1,2,0+30
paste sprite 1,-2,0+30
paste sprite 1,0,2+30
paste sprite 1,0,-2+30
set sprite alpha 1,64
paste sprite 1,4,0+30
paste sprite 1,-4,0+30
paste sprite 1,0,4+30
paste sprite 1,0,-4+30
set sprite alpha 1,32
paste sprite 1,6,0+30
paste sprite 1,-6,0+30
paste sprite 1,0,6+30
paste sprite 1,0,-6+30
set sprite alpha 1,16
paste sprite 1,8,0+30
paste sprite 1,-8,0+30
paste sprite 1,0,8+30
paste sprite 1,0,-8+30
set sprite alpha 1,8
paste sprite 1,10,0+30
paste sprite 1,-10,0+30
paste sprite 1,0,10+30
paste sprite 1,0,-10+30
set sprite alpha 1,4
paste sprite 1,12,0+30
paste sprite 1,-12,0+30
paste sprite 1,0,12+30
paste sprite 1,0,-12+30
else
set sprite alpha 1,255
sprite 1,0,30,1
endif
text 10,5,"FPS:"+str$(screen fps())
text 10,20,"Pulsa ESPACIO para desenfocar"
sync
loop
Genius + Technique + Art = Programming