Help adapting FredBorg DOF Effect to any camzoom

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

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

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!