[Bf-blender-cvs] [40952d229a4] lineart-shadow: LineArt: Div 0 issue caught.
YimingWu
noreply at git.blender.org
Wed Jul 21 06:23:45 CEST 2021
Commit: 40952d229a4493169294d7cb06aa04edebf83b2e
Author: YimingWu
Date: Wed Jul 21 12:23:31 2021 +0800
Branches: lineart-shadow
https://developer.blender.org/rB40952d229a4493169294d7cb06aa04edebf83b2e
LineArt: Div 0 issue caught.
===================================================================
M release/datafiles/locale
M release/scripts/addons
M release/scripts/addons_contrib
M source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
M source/tools
===================================================================
diff --git a/release/datafiles/locale b/release/datafiles/locale
index 62e82958a76..4833954c0ac 160000
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@ -1 +1 @@
-Subproject commit 62e82958a760dad775d9b3387d7fb535fd6de4c6
+Subproject commit 4833954c0ac85cc407e1d5a153aa11b1d1823ec0
diff --git a/release/scripts/addons b/release/scripts/addons
index 1adb56d8b01..f86f25e6221 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit 1adb56d8b01cf1327f58c6fb8b1ccc8b7efd76ad
+Subproject commit f86f25e62217264495d05f116ccb09d575fe9841
diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib
index 788441f2930..5a82baad9f9 160000
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@ -1 +1 @@
-Subproject commit 788441f2930465bbfba8f0797b12dcef1d46694d
+Subproject commit 5a82baad9f986722104280e8354a4427d8e9eab1
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index 0933b7b073d..49fe4e64b84 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -4373,7 +4373,7 @@ static void lineart_shadow_segment_slice_get(double *fbl,
double *r_fb,
double *r_g)
{
- double real_at = (at - at_l) / (at_r - at_l);
+ double real_at = ((at_r - at_l) == 0) ? 0 : ((at - at_l) / (at_r - at_l));
double ga = fbl[3] * real_at / (fbr[3] * (1.0f - real_at) + fbl[3] * real_at);
interp_v3_v3v3_db(r_fb, fbl, fbr, real_at);
r_fb[3] = interpd(fbr[3], fbl[3], ga);
@@ -4413,12 +4413,12 @@ static bool lineart_do_closest_segment(bool is_persp,
*is_side_2r = true;
side++;
}
- if (s1fbl[zid] < s2fbl[zid]) {
+ if (s1fbl[zid] <= s2fbl[zid]) {
copy_v4_v4_db(r_fbl, s1fbl);
copy_v3_v3_db(r_gl, s1gl);
side--;
}
- if (s1fbr[zid] < s2fbr[zid]) {
+ if (s1fbr[zid] <= s2fbr[zid]) {
copy_v4_v4_db(r_fbr, s1fbr);
copy_v3_v3_db(r_gr, s1gr);
*is_side_2r = false;
diff --git a/source/tools b/source/tools
index c8579c5cf43..01f51a0e551 160000
--- a/source/tools
+++ b/source/tools
@@ -1 +1 @@
-Subproject commit c8579c5cf43229843df505da9644b5b0b7201974
+Subproject commit 01f51a0e551ab730f0934dc6488613690ac4bf8f
More information about the Bf-blender-cvs
mailing list