From 35b7da0e9dab7eb0c10cc6804421f7b3094ba1f5 Mon Sep 17 00:00:00 2001 From: bwangxxx <390297188@qq.com> Date: Mon, 25 Sep 2023 17:55:42 +0800 Subject: [PATCH] fix_fbm --- zeno/src/nodes/prim/WBErode.cpp | 2 +- zeno/src/nodes/prim/WBNoise.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/zeno/src/nodes/prim/WBErode.cpp b/zeno/src/nodes/prim/WBErode.cpp index 9535ab0499..eded0fc387 100644 --- a/zeno/src/nodes/prim/WBErode.cpp +++ b/zeno/src/nodes/prim/WBErode.cpp @@ -2514,7 +2514,7 @@ struct HF_maskByFeature : INode { // //!useCurvature && // //!useOcclusion) { - mask[idx] = 0; +// mask[idx] = 0; } if (useSlope) { diff --git a/zeno/src/nodes/prim/WBNoise.cpp b/zeno/src/nodes/prim/WBNoise.cpp index 4c3655595e..6885e88392 100644 --- a/zeno/src/nodes/prim/WBNoise.cpp +++ b/zeno/src/nodes/prim/WBNoise.cpp @@ -1136,7 +1136,8 @@ glm::vec3 noise_random3(glm::vec3 p) { float noise_mydistance(glm::vec3 a, glm::vec3 b, int t) { if (t == 0) { - return length(a - b); + float d = length(a - b); + return d*d; } else if (t == 1) { float xx = abs(a.x - b.x);