Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2019-01-25 00:01:03 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-01-25 17:04:18 +0300
commit71e30028240798d4ec34ee380191058b9313902b (patch)
treef97cb7b10138a3468d6a790b945ccc3e0375ce59 /source/blender/draw/engines/workbench/workbench_private.h
parent3f6e14e667c4442bcc1f4d1fc795633cc706150f (diff)
Workbench: Depth Of Field: Optimisation
- Compute samples positions on CPU. - Use 3x3 Box blur instead of 2x2. - Implement bokeh parameters. With this commit, dof performance is almost negligeable. The quality is a bit lower than before but can be improve. Also now big Circle of confusion are supported (up to 200px). Cost is ~1.25ms on AMD Vega with a 2560p viewport than full HD and pretty shallow depth of field. Coc downsampling and dilation is not used anymore for now (commented).
Diffstat (limited to 'source/blender/draw/engines/workbench/workbench_private.h')
-rw-r--r--source/blender/draw/engines/workbench/workbench_private.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_private.h b/source/blender/draw/engines/workbench/workbench_private.h
index 62622b56805..ef114370587 100644
--- a/source/blender/draw/engines/workbench/workbench_private.h
+++ b/source/blender/draw/engines/workbench/workbench_private.h
@@ -115,6 +115,7 @@ typedef struct WORKBENCH_TextureList {
typedef struct WORKBENCH_StorageList {
struct WORKBENCH_PrivateData *g_data;
struct WORKBENCH_EffectInfo *effects;
+ float *dof_ubo_data;
} WORKBENCH_StorageList;
typedef struct WORKBENCH_PassList {
@@ -239,10 +240,14 @@ typedef struct WORKBENCH_PrivateData {
struct GPUTexture *coc_halfres_tx;
struct GPUTexture *coc_temp_tx;
struct GPUTexture *coc_tiles_tx[2];
+ struct GPUUniformBuffer *dof_ubo;
float dof_aperturesize;
float dof_distance;
float dof_invsensorsize;
float dof_near_far[2];
+ float dof_blades;
+ float dof_rotation;
+ float dof_ratio;
bool dof_enabled;
/* Color Management */