Closed simonharrisco closed 5 years ago
Bilateral blur is no longer used for dof so i think it can be removed from the shader now, ill do it in its own commit
@simonharrisco what about dofFocus
? Also why don't we do the usual and check Three/Babylon/Unity param names?
Unity called it 'Focal Length' https://docs.unity3d.com/Packages/com.unity.postprocessing@2.1/manual/Depth-of-Field.html
Babylon doesnt have an option to change it, but lets you do lots of other things: https://doc.babylonjs.com/how_to/using_depth-of-field_and_other_lens_effects
https://doc.babylonjs.com/how_to/using_depth-of-field_and_other_lens_effects
dof_focus_distance
- The distance at which focus is set. Everything out of focus will be blurred. Note that a focus distance above a few hundred units gives you infinity focus.dof_aperture
- Default: 1. How quickly things outside of focus will become blurred. Set high to give a ‘miniature’ effect (a.k.a. tilt shift).https://docs.unity3d.com/Packages/com.unity.postprocessing@2.1/manual/Depth-of-Field.html https://github.com/Unity-Technologies/PostProcessing/wiki/Depth-of-Field
Focus Distance
- Set the distance to the point of focus.Aperture
- Set the ratio of the aperture (known as f-stop or f-number). The smaller the value is, the shallower the depth of field is. [0.5, 32]Focal Length
- Set the distance between the lens and the film. The larger the value is, the shallower the depth of field is. (edited) Aperture
- The Aperture is the diameter of the opening through which light passes. The Aperture is defined by Focal Length divided by an F-stop number.The Focus Distance
- is the distance from the center of the camera lens to the subject of the shot that is put into focus, creating a focal plane. The closer the camera is to the subject, the more the background will end up out-of-focus.te
Related Physically based camera #232
Filaments links camera's aperture to DOF, while UE4 doesn't (to avoid constant exposure changes).
@simonharrisco so if we go for aperture what is actual value? 1.4 ~ 16? And we clamp/remap it somehow so it looks good?
@simonharrisco could we add DOF only example? No orbiter, 3 aperture views, focus distance slider, resolution check boxes (so we can test resolution independence)?
Some things that probably require thought going forward: