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:
authorSergej Reich <sergej.reich@googlemail.com>2014-11-11 20:16:20 +0300
committerSergej Reich <sergej.reich@googlemail.com>2014-11-11 20:16:20 +0300
commit52d571e189d5ba48dbbc2ad0cf24608f30c6bbc2 (patch)
tree1677047e684f3c44168e3be30ceddec926782110 /source/blender/render
parent490b73ff22ce554eaed6f0804b1fd1e9f36ceb43 (diff)
Avoid calling powf with integer exponent in more places
Move powX functions from particle code into math library and use them.
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/rayshade.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c
index ff1f502cc1a..54fb3b8d8a3 100644
--- a/source/blender/render/intern/source/rayshade.c
+++ b/source/blender/render/intern/source/rayshade.c
@@ -1299,7 +1299,7 @@ static void trace_refract(float col[4], ShadeInput *shi, ShadeResult *shr)
float v_refract[3], v_refract_new[3];
float sampcol[4], colsq[4];
- float blur = powf(1.0f - shi->mat->gloss_tra, 3);
+ float blur = pow3f(1.0f - shi->mat->gloss_tra);
short max_samples = shi->mat->samp_gloss_tra;
float adapt_thresh = shi->mat->adapt_thresh_tra;
@@ -1400,7 +1400,7 @@ static void trace_reflect(float col[3], ShadeInput *shi, ShadeResult *shr, float
float v_nor_new[3], v_reflect[3];
float sampcol[4], colsq[4];
- float blur = powf(1.0f - shi->mat->gloss_mir, 3);
+ float blur = pow3f(1.0f - shi->mat->gloss_mir);
short max_samples = shi->mat->samp_gloss_mir;
float adapt_thresh = shi->mat->adapt_thresh_mir;
float aniso = 1.0f - shi->mat->aniso_gloss_mir;