Repository: godot
Issue: [TRACKER] DOF Blur quality issues 
Labels: bug,topic:rendering,topic:3d

### Godot version

9c890ef2f

### System information

Windows 11/64, RTX 3070, Vulkan

### Issue description

Tracker for depth of field blur issues. 

I can pull any of these out into separate issues if desired. Otherwise, the detail is below.

- [ ] [Jitter does nothing](#jitter)
- [ ] [Label3D is incorrectly affected by blur](#label3d)
- [ ] [Blur artifacts](#blur-artifacts)
- [x] #65724
- [x] #67542
- [ ] #56911
- [ ] #69460
- [ ] #56431
- [ ] #62473 (Still valid until artifacts and Physical Camera improved Practical Camera has much better blur)
- [ ] #69458

### Steps to reproduce

* Load the MRP. 
* Cycle through blur quality project settings.
* Test each issue.

### Minimal reproduction project

[test_dof_blur.zip](https://github.com/godotengine/godot/files/9457073/test_dof_blur.zip)


# <a id="jitter" /> Jitter does nothing
`rendering/camera/depth_of_field/depth_of_field_use_jitter` doesn't seem to do anything. 
I see no effect on any bokeh or quality level.

# <a id="label3d" />  Label3D
Label3D is incorrectly affected by blur

![image](https://user-images.githubusercontent.com/632766/187552427-6162e062-8687-44aa-a9dd-471b7b13eb4c.png)


# <a id="blur-artifacts" /> Blur Artifacts

Different blur algorithms amounts have different artifacts on movement. This is tested while adjusting focus_distance between near and far and back. This procedure is done all the time when a real camera is autofocusing, or when an First Assistant Camera pulls focus on a camera when filmmaking (a person manually focusing the camera). Every film racks focus. Many video games also use this technique. 

## Hexagon
### Low

Tested w/ f/4, 100 ISO, 250 shutter

This seems to be the reference setting and the best all around, however it has issues.

* The focal planes (hex/low) move pixels of a focused object up and to the left significantly enough to notice and be disconcerting. It affects details of faces and edges. Racking focus, objects pops up then back down as focus hits and leaves them. It looks like it's using an up/left directional blur instead of a radial blur. You can see on the zoomed image that the top left pixels blur but the bottom right stay static. It only moves pixels when close to the focus plane (eg 2.4-4 for an object @ 3). Outside of that range they don't move. 

https://user-images.githubusercontent.com/632766/186451072-b323c0af-e4b7-455b-be89-9fa2e6aaca1e.mp4

![moving focus](https://user-images.githubusercontent.com/632766/186449614-2871d539-7cf0-46f3-952f-a99de07004a7.gif)

### Very Low

Tested w/ f/4, 100 ISO, 250 shutter

* A bit of pixel movement on focus.

* It appears that the blur amount is stepped. As the MRP racks between 3 and 6, watch the background. It doesn't change smoothly. It looks more like it changes in 3 increments as if recording with a stop motion camera. Compare with Low, which changes smoothly. Not present on Low or High.

### Medium

Tested with f/2, 25 ISO, 250 shutter to get about the same amount of blur. 
 
* A bit of pixel movement on focus.

* This level also changes the blur in steps, like Very Low. Not present on Low or High.

### High

Tested with f/2, 25 ISO, 250 shutter to get about the same amount of blur.  Otherwise, no artifacts. 

* Pixel movement is much less pronounced.


## Box

Pretty much the same as Hexagon.

* Pixels move around on focus. Less pronounced on high.
* Blur frame rate
  * Very Low & Medium: Stepped blur levels
  * Low: A tiny bit stepped
  * High: Smooth

## Circle

Tested with f/2, 25 ISO, 250 shutter.
 
In its current state, this is not usable for a racking focus camera due to artifacts. Performance takes a big hit as well. The blur looks amazing, so it's too bad. 

### Very low

* Blur is unstable. The blur noise changes each frame. 
* The edges of objects flutter as the focal planes move. It's like the body and edges are blurred separately and not in sync with each other.

https://user-images.githubusercontent.com/632766/186460824-8e273f1b-0a9e-41b7-8750-2c299c79d47e.mp4

### Low
* Same as above. Runs on par with other blurs.

### Medium
* Blur is smooth and stable. Though a heavy performance hit. Runs at 1/5th the speed of other blurs
* Edges are still a problem

### High
* Same as Medium. Heaviest performance hit. Runs at 25% the speed of other blurs.
* Edges are a problem.