Depth of field high quality:

A new checkbox "High quality" is provided in camera settings to enable
this. This creates a depth of field that is much closer to the rendered
result and even supports aperture blades in the effect, but it's more
expensive too. There are optimizations to do here since the technique is
very fill rate heavy.

People, be careful, this -can- lock up your screen if depth of field
blurring is too extreme.

Technical details:

This uses geometry shaders + instancing and is an adaptation of
techniques gathered from

http://bartwronski.com/2014/04/07/bokeh-depth-of-field-going-insane-

 http://advances.realtimerendering.com/s2011/SousaSchulzKazyan%20-
%20in%20Real-Time%20Rendering%20Course).ppt

TODOs:

* Support dithering to minimize banding.
* Optimize fill rate in geometry shader.
This commit is contained in:
Antony Riakiotakis
2015-03-03 17:47:31 +01:00
parent 93048873f1
commit 3e9947c4d4
14 changed files with 1033 additions and 340 deletions

View File

@@ -187,6 +187,9 @@ class DATA_PT_camera_dof(CameraButtonsPanel, Panel):
col = split.column()
col.prop(dof_options, "fstop")
col.prop(dof_options, "high_quality")
if dof_options.high_quality:
col.prop(dof_options, "num_blades")
sub = col.column()
sub.active = cam.dof_object is None
sub.prop(cam, "dof_distance", text="Distance")