Allow using separate amounts for near and far depth of field#62501
Allow using separate amounts for near and far depth of field#62501Calinou wants to merge 1 commit intogodotengine:masterfrom
Conversation
|
Thank you.
What does that mean? My physical camera adjusts near and far planes and blur amounts every frame according to the focal point, aperture/fov, and DOF distance calculations. It also racks focus, so iterates these changes over time as the focal point moves from A to B. So as long as the blur amount is stable it should be fine because I calculate and adjust both each frame. By stable I mean, if near blur of 0.1 @ 10m when far blur is X is not the same as near blur of 0.1 @ 10m when far blur is Y, that's a problem. Or if the blur shape or pattern changes frame to frame, that's also an issue. Then we have dancing noise like the moving shadows when rotating a directional light, or flickering SS ambient occlusion in Godot 3. |
This restores functionality that was available in Godot 3.x's depth of field.
41f3b0a to
e093cfd
Compare
|
I'm currently porting my PhysicalCamera to test this, but GDScript 2 has many changes and gotchas that I'm working through. I've already noticed a problem with depth changes between blur quality. I'll update when I have something definite. |
|
The overall blur look is soooo much better in Godot 4 than 3. My camera is ported, however I came across the bug documented in #62678. I cannot continue testing this one until the other one is fixed. |
|
@TokisanGames: #62678 got fixed. Can you resume your testing of this fix? |
|
@MJacred read from here #62473 (comment) |
This restores functionality that was available in Godot 3.x's depth of field.
Tested on the Vulkan Clustered and Vulkan Mobile backends, with all combinations of bokeh shapes and bokeh qualities. It works 🙂
The only quirk I noticed is that near blur's amount will appear to change if you also change the far blur amount (and vice versa). I'm not sure how this can be fixed.
Testing project: test_dof_blur_separate_near_far_amount.zip
This closes #62473.