[ELI5] Why does Depth of Field (DoF) setting in video games usually take a toll in performance?

506 views

By blurring the background. Your basically lessening the need to render and reduce resolutions. So it would logically make sense for the increase of the games FPS. However it seems it turning on does oddly the opposite? And I wanna know why that is

In: 48

16 Answers

Anonymous 0 Comments

Dof isn’t a blur
It’s a circle of confusion.

imagine a pinhole camera like this |X| … the left vertical line is the world… the middle of the X is the pinhole in a box…and the vertical line on the right is the film back…
The X represents the LIGHT – … it travels into the camera in straight lines … and because the hole is so small only light that’s traveling straight through that tiny hole passes into the box and … a faint, inverted image hits the film back(or the back of the box)

As the hole grows larger you get the desirable effect of letting in more light – but the light is no longer all lined up like an X!
Because a bunch of light can come in from different directions you get a bunch of Xs overlapping each other… like if you were looking at an X while drunk.

To fix the fuzziness and get the image back, we invented something called a lens!! This curved glass aligns the light again!!! …. But it can only align it for ONE a plane in front of the lens…
This would take drawings to explain
But basically – only some things are at the right distance… so the curvature of the lens makes a sharp image on the film back.

https://i0.wp.com/farm8.staticflickr.com/7087/7155171948_927b343a45.jpg?resize=500%2C196

If you want to know more:

The round out-of-focus balls you see in the background of photos are called the bokeh
The shape and size of the bokeh is dependent on the shape and size of the Iris (and film back)

This is why there’s almost no dof in a pinhole camera … the pinhole is the iris and it’s so small that there’s a very small circle of confusion. But as the iris size grows, you get more light in the camera but also a larger circle of confusion…
The lens does it’s job and keep the images in the picture plane sharp, BUT everything else still looks Drunk

TO ANSWER YOUR QUESTION:
so when video games are properly emulating the circle of confusion they have to render the images many times! (Essentially being pinhole cameras from many points, and then blend them together)…
Blurs are just a 2D effect… DoF is a 3D effect.

You are viewing 1 out of 16 answers, click here to view all answers.