pex-gl / pex-renderer

Physically based renderer (PBR) and scene graph for PEX.
https://pex-gl.github.io/pex-renderer/examples/index.html
MIT License
237 stars 16 forks source link

35 single pas DOF #222

Closed simonharrisco closed 5 years ago

simonharrisco commented 5 years ago

Some things that probably require thought going forward:

simonharrisco commented 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

vorg commented 5 years ago

@simonharrisco what about dofFocus? Also why don't we do the usual and check Three/Babylon/Unity param names?

simonharrisco commented 5 years ago

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

vorg commented 5 years ago

Babylon

https://doc.babylonjs.com/how_to/using_depth-of-field_and_other_lens_effects

Unity

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

UE4 (with interactive examples!)

https://docs.unrealengine.com/en-US/Engine/Rendering/PostProcessEffects/DepthOfField/CinematicDOFMethods/index.html

vorg commented 5 years ago

Related Physically based camera #232

Filaments links camera's aperture to DOF, while UE4 doesn't (to avoid constant exposure changes).

vorg commented 5 years ago

@simonharrisco so if we go for aperture what is actual value? 1.4 ~ 16? And we clamp/remap it somehow so it looks good?

vorg commented 5 years ago

@simonharrisco could we add DOF only example? No orbiter, 3 aperture views, focus distance slider, resolution check boxes (so we can test resolution independence)?

IMG_8050