Use https://turbowarp.org/469108773?turbo&hqpen to run in realtime. Stop the project to see the final image. On turbowarp, render it with your preffered settings and see how it affects the depth of field in realtime! You can use WASDQE and ARROW keys to move if you want. Focal length is the z position centre of focus . Aperture radius affects how much the blur increases the further the depth of the point from the centre of focus. Samples affects the quality. SEE BELOW for an EXPLANATION. I decided to make this because you can see how to edit DOF in realtime, which is something nobody has done on scratch before. Due to scratch being slow however, it is pretty much impossible to run on realtime in scratch, so use turbowarp. I am soon to release a more complete pathtracer that isn't realtime, so watch out for that! Explanation - how depth of field works is that it shoots any random point from the aperture to a point on a focal plane in front of the camera. The focal length is the z-distance of the focal plane, and the aperture radius is how large the aperture can be. What this means is that all of the rays from the aperture get closer and eventually converge to each other as they are nearer the focal plane, and vice versa. Credits - Filmic color space - @piano_miles @piano_miles and @spinningcube helped a lot with the depth of field. #ray #madness !!!! #3d #raytrace #raytracing