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>2021-02-03 18:46:11 +0300
committerClément Foucault <foucault.clem@gmail.com>2021-02-03 18:46:11 +0300
commit376bffae032c4fd55cf92d70b249674d1b0cda5a (patch)
tree8bb1647010b4e5135e6b0daa69d365802df0dbd1
parentc96b1e4cda093558d5a3cf8da8c7f72d2adb2ddc (diff)
EEVEE: Depth of field: Fix bokeh shape not inverted for scatter
The wrong vector was negated.
-rw-r--r--source/blender/draw/engines/eevee/eevee_depth_of_field.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_depth_of_field.c b/source/blender/draw/engines/eevee/eevee_depth_of_field.c
index 4f28ede3bc6..e9d68ff24fa 100644
--- a/source/blender/draw/engines/eevee/eevee_depth_of_field.c
+++ b/source/blender/draw/engines/eevee/eevee_depth_of_field.c
@@ -770,11 +770,11 @@ static void dof_scatter_pass_init(EEVEE_FramebufferList *fbl,
DRW_shgroup_uniform_vec2_copy(grp, "bokehAnisotropy", fx->dof_bokeh_aniso);
if (use_bokeh_tx) {
/* Negate to flip bokeh shape. Mimics optical phenomenon. */
- negate_v2(fx->dof_bokeh_aniso);
+ negate_v2(fx->dof_bokeh_aniso_inv);
DRW_shgroup_uniform_vec2_copy(grp, "bokehAnisotropyInv", fx->dof_bokeh_aniso_inv);
DRW_shgroup_uniform_texture_ref(grp, "bokehLut", &fx->dof_bokeh_scatter_lut_tx);
/* Restore. */
- negate_v2(fx->dof_bokeh_aniso);
+ negate_v2(fx->dof_bokeh_aniso_inv);
}
DRW_shgroup_call_procedural_triangles(grp, NULL, sprite_count);