Help adapting FredBorg DOF Effect to any camzoom

Blitz3D Forums/Blitz3D Programming/Help adapting FredBorg DOF Effect to any camzoom

Pinete(Posted 2006) [#1]
Hi,
I'm trying to adapt the Fredborg Depth of field effect:

http://www.blitzbasic.com/codearcs/codearcs.php?code=1030

to work with any camerazoom value, but I don't obtain
the desired results.

I'm trying to multiply the position of each layer with
(1.0/camerazoom), with x, with y, with z, but it doesn't
works!

Please, could someone help me?
What line of the function should I change in order to
make the effect valid for any camerazoom value??

Thanks in advance!


jfk EO-11110(Posted 2006) [#2]
Just added a version to Fredborgs code archive entry:
http://www.blitzbasic.com/codearcs/codearcs.php?code=1030
Not sure if it's 100% perfect, but it's kind of working.


Pinete(Posted 2006) [#3]
Thank you very much jfk!!!
Thank you!

By the way, do you know what it means the things
Eyed Jack talk about in the last post of the thread,
about lock the backbufer, etc...

What does he refering to?

regards and thanks again!


jfk EO-11110(Posted 2006) [#4]
He was referring to the problem Floyd had with the mouse, a mouse action lag or delay.


Pinete(Posted 2006) [#5]
and, how could help lock the buffer to obtain a more fluid mouse movement?

He also comments something about stress of the graphics card..

If I lock the backbuffer could avoid some 'delay' effects if they depend of the texture size of similars?

and 'how' and 'when' should I lock the backbuffer??

thanks and regards!


jfk EO-11110(Posted 2006) [#6]
uh, I think this is only required when you have some massive mouse problems.