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:
authorCampbell Barton <ideasman42@gmail.com>2020-05-01 08:04:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-05-01 08:05:39 +0300
commitaff5e18adb8f1a22fcf56b49c4539341ef197da9 (patch)
tree66dd59c0b25f965250a304d8aced43e671b44056
parentff1174e52c92ba5580a309ff9f6636fe179c4051 (diff)
Cleanup: replace inline dot-product with dot_v4v4
-rw-r--r--source/blender/render/intern/source/render_texture.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index de317d55370..ee484924bf9 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -761,8 +761,7 @@ static int voronoiTex(const Tex *tex, const float texvec[3], TexResult *texres)
}
voronoi(texvec[0], texvec[1], texvec[2], da, pa, tex->vn_mexp, tex->vn_distm);
- texres->tin = sc * fabsf(tex->vn_w1 * da[0] + tex->vn_w2 * da[1] + tex->vn_w3 * da[2] +
- tex->vn_w4 * da[3]);
+ texres->tin = sc * fabsf(dot_v4v4(&tex->vn_w1, da));
if (tex->vn_coltype) {
float ca[3]; /* cell color */
@@ -809,14 +808,11 @@ static int voronoiTex(const Tex *tex, const float texvec[3], TexResult *texres)
/* calculate bumpnormal */
voronoi(texvec[0] + offs, texvec[1], texvec[2], da, pa, tex->vn_mexp, tex->vn_distm);
- texres->nor[0] = sc * fabsf(tex->vn_w1 * da[0] + tex->vn_w2 * da[1] + tex->vn_w3 * da[2] +
- tex->vn_w4 * da[3]);
+ texres->nor[0] = sc * fabsf(dot_v4v4(&tex->vn_w1, da));
voronoi(texvec[0], texvec[1] + offs, texvec[2], da, pa, tex->vn_mexp, tex->vn_distm);
- texres->nor[1] = sc * fabsf(tex->vn_w1 * da[0] + tex->vn_w2 * da[1] + tex->vn_w3 * da[2] +
- tex->vn_w4 * da[3]);
+ texres->nor[1] = sc * fabsf(dot_v4v4(&tex->vn_w1, da));
voronoi(texvec[0], texvec[1], texvec[2] + offs, da, pa, tex->vn_mexp, tex->vn_distm);
- texres->nor[2] = sc * fabsf(tex->vn_w1 * da[0] + tex->vn_w2 * da[1] + tex->vn_w3 * da[2] +
- tex->vn_w4 * da[3]);
+ texres->nor[2] = sc * fabsf(dot_v4v4(&tex->vn_w1, da));
tex_normal_derivate(tex, texres);
rv |= TEX_NOR;