I think this is right forum to post this in, maybe not. If not I hope a mod will move this.
I'm using a DoF code by Slin. And I'm trying to have it dynamicaly adjust according to what the player is looking at. I do this through a c_trace. It's been a while, and long while, since I've used 3DGS. So maybe somebody could explain to me why this code dosen't work
Code:
 void calc_dof()
{
	PP_DoF_init(camera,500,1000,1000,30,2);
	while(1)
	{
		c_trace(camera.x, vector(camera.x, camera.y, camera.z-1000),0);
		
		PP_DoF_SetValues(target.x,target.x+500,1000,30,2);
		//beep();
		wait(1);
	} 


When I had the beep uncommented it was beeping, so I know the code is working to that extent, but the focus is not adjusting.

By the way the parameters for the DoF are this in Slin's code:
Code:
 		PP_DoF_SetValues(NearPlaneDist,FarPlaneDist,FarFadeoutDist,BlurRadius,DownsampleFaktor); 



-Johnny Thrash