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:
authorAntonioya <blendergit@gmail.com>2018-10-14 13:19:16 +0300
committerAntonioya <blendergit@gmail.com>2018-10-14 13:21:44 +0300
commitac61eb3900cb8bd0d43846c5ef94ea89cbe9bd9d (patch)
tree8f4add388fe0f11f90be80eb2df0effcdea4c580 /source/blender/draw/engines/gpencil/gpencil_shader_fx.c
parent55e3c17ccc1e6154db69d0143edd9457c6948c8d (diff)
GP: Fix several issues in blur FX
There were some problems with the z-depth and especially when tries to blur a pixel outside the viewport.
Diffstat (limited to 'source/blender/draw/engines/gpencil/gpencil_shader_fx.c')
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_shader_fx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
index 2165fb251dc..ebdb2cf086a 100644
--- a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
+++ b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
@@ -218,6 +218,7 @@ static void DRW_gpencil_fx_blur(
DRW_shgroup_call_add(fx_shgrp, fxquad, NULL);
DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeColor", &e_data->temp_color_tx_a);
DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeDepth", &e_data->temp_depth_tx_a);
+ DRW_shgroup_uniform_vec2(fx_shgrp, "Viewport", DRW_viewport_size_get(), 1);
DRW_shgroup_uniform_int(fx_shgrp, "blur", &fxd->blur[0], 2);
DRW_shgroup_uniform_vec3(fx_shgrp, "loc", &cache->loc[0], 1);
@@ -409,6 +410,7 @@ static void DRW_gpencil_fx_rim(
DRW_shgroup_call_add(fx_shgrp, fxquad, NULL);
DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeColor", &e_data->temp_color_tx_fx);
DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeDepth", &e_data->temp_depth_tx_fx);
+ DRW_shgroup_uniform_vec2(fx_shgrp, "Viewport", DRW_viewport_size_get(), 1);
DRW_shgroup_uniform_int(fx_shgrp, "blur", &fxd->blur[0], 2);
DRW_shgroup_uniform_vec3(fx_shgrp, "loc", &cache->loc[0], 1);
@@ -493,6 +495,7 @@ static void DRW_gpencil_fx_shadow(
DRW_shgroup_call_add(fx_shgrp, fxquad, NULL);
DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeColor", &e_data->temp_color_tx_fx);
DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeDepth", &e_data->temp_depth_tx_fx);
+ DRW_shgroup_uniform_vec2(fx_shgrp, "Viewport", DRW_viewport_size_get(), 1);
DRW_shgroup_uniform_int(fx_shgrp, "blur", &fxd->blur[0], 2);
DRW_shgroup_uniform_vec3(fx_shgrp, "loc", &cache->loc[0], 1);
@@ -551,6 +554,7 @@ static void DRW_gpencil_fx_glow(
DRW_shgroup_call_add(fx_shgrp, fxquad, NULL);
DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeColor", &e_data->temp_color_tx_fx);
DRW_shgroup_uniform_texture_ref(fx_shgrp, "strokeDepth", &e_data->temp_depth_tx_fx);
+ DRW_shgroup_uniform_vec2(fx_shgrp, "Viewport", DRW_viewport_size_get(), 1);
DRW_shgroup_uniform_int(fx_shgrp, "blur", &fxd->blur[0], 2);
DRW_shgroup_uniform_vec3(fx_shgrp, "loc", &cache->loc[0], 1);