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>2017-12-07 15:53:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-12-07 15:53:03 +0300
commit1c7cfa025c87e8f31790b48cbb189949f7949ad1 (patch)
tree3869d475a9d10c005b0bb8006eb77bf55f1903d3 /source/blender/render
parent46f518e92790a04885f4e047bb59b11019d73aa3 (diff)
parent2e2e6e3bdb694e56fcd161f06b6751e953cd2fa1 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/pointdensity.c8
-rw-r--r--source/blender/render/intern/source/render_texture.c11
-rw-r--r--source/blender/render/intern/source/shadeoutput.c12
3 files changed, 15 insertions, 16 deletions
diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c
index e94a452c94a..28d62f36ddd 100644
--- a/source/blender/render/intern/source/pointdensity.c
+++ b/source/blender/render/intern/source/pointdensity.c
@@ -48,6 +48,7 @@
#include "DNA_particle_types.h"
#include "DNA_texture_types.h"
+#include "BKE_colorband.h"
#include "BKE_deform.h"
#include "BKE_DerivedMesh.h"
#include "BKE_lattice.h"
@@ -55,7 +56,6 @@
#include "BKE_object.h"
#include "BKE_particle.h"
#include "BKE_scene.h"
-#include "BKE_texture.h"
#include "BKE_colortools.h"
#include "DEG_depsgraph.h"
@@ -786,7 +786,7 @@ static int pointdensity_color(PointDensity *pd, TexResult *texres, float age, co
switch (pd->color_source) {
case TEX_PD_COLOR_PARTAGE:
if (pd->coba) {
- if (do_colorband(pd->coba, age, rgba)) {
+ if (BKE_colorband_evaluate(pd->coba, age, rgba)) {
texres->talpha = true;
copy_v3_v3(&texres->tr, rgba);
texres->tin *= rgba[3];
@@ -799,7 +799,7 @@ static int pointdensity_color(PointDensity *pd, TexResult *texres, float age, co
float speed = len_v3(vec) * pd->speed_scale;
if (pd->coba) {
- if (do_colorband(pd->coba, speed, rgba)) {
+ if (BKE_colorband_evaluate(pd->coba, speed, rgba)) {
texres->talpha = true;
copy_v3_v3(&texres->tr, rgba);
texres->tin *= rgba[3];
@@ -831,7 +831,7 @@ static int pointdensity_color(PointDensity *pd, TexResult *texres, float age, co
break;
case TEX_PD_COLOR_VERTWEIGHT:
texres->talpha = true;
- if (pd->coba && do_colorband(pd->coba, col[0], rgba)) {
+ if (pd->coba && BKE_colorband_evaluate(pd->coba, col[0], rgba)) {
copy_v3_v3(&texres->tr, rgba);
texres->tin *= rgba[3];
}
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index 91d1f63a1be..e6138842f09 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -54,6 +54,7 @@
#include "BKE_node.h"
#include "BKE_animsys.h"
+#include "BKE_colorband.h"
#include "BKE_DerivedMesh.h"
#include "BKE_global.h"
#include "BKE_main.h"
@@ -161,15 +162,15 @@ static void tex_normal_derivate(Tex *tex, TexResult *texres)
{
if (tex->flag & TEX_COLORBAND) {
float col[4];
- if (do_colorband(tex->coba, texres->tin, col)) {
+ if (BKE_colorband_evaluate(tex->coba, texres->tin, col)) {
float fac0, fac1, fac2, fac3;
fac0= (col[0]+col[1]+col[2]);
- do_colorband(tex->coba, texres->nor[0], col);
+ BKE_colorband_evaluate(tex->coba, texres->nor[0], col);
fac1= (col[0]+col[1]+col[2]);
- do_colorband(tex->coba, texres->nor[1], col);
+ BKE_colorband_evaluate(tex->coba, texres->nor[1], col);
fac2= (col[0]+col[1]+col[2]);
- do_colorband(tex->coba, texres->nor[2], col);
+ BKE_colorband_evaluate(tex->coba, texres->nor[2], col);
fac3= (col[0]+col[1]+col[2]);
texres->nor[0]= (fac0 - fac1) / 3.0f;
@@ -1218,7 +1219,7 @@ static int multitex(Tex *tex,
if (tex->flag & TEX_COLORBAND) {
float col[4];
- if (do_colorband(tex->coba, texres->tin, col)) {
+ if (BKE_colorband_evaluate(tex->coba, texres->tin, col)) {
texres->talpha = true;
texres->tr= col[0];
texres->tg= col[1];
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index 9279899ef66..c2d5c060530 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -27,7 +27,6 @@
* \ingroup render
*/
-
#include <stdio.h>
#include <float.h>
#include <math.h>
@@ -36,10 +35,9 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
+#include "BKE_colorband.h"
#include "BKE_colortools.h"
#include "BKE_material.h"
-#include "BKE_texture.h"
-
#include "DNA_group_types.h"
#include "DNA_lamp_types.h"
@@ -942,7 +940,7 @@ static void ramp_diffuse_result(float *diff, ShadeInput *shi)
if (ma->ramp_col) {
if (ma->rampin_col==MA_RAMP_IN_RESULT) {
float fac = IMB_colormanagement_get_luminance(diff);
- do_colorband(ma->ramp_col, fac, col);
+ BKE_colorband_evaluate(ma->ramp_col, fac, col);
/* blending method */
fac= col[3]*ma->rampfac_col;
@@ -986,7 +984,7 @@ static void add_to_diffuse(float diff[3], const ShadeInput *shi, const float is,
break;
}
- do_colorband(ma->ramp_col, fac, col);
+ BKE_colorband_evaluate(ma->ramp_col, fac, col);
/* blending method */
fac = col[3] * ma->rampfac_col;
@@ -1015,7 +1013,7 @@ static void ramp_spec_result(float spec_col[3], ShadeInput *shi)
float col[4];
float fac = IMB_colormanagement_get_luminance(spec_col);
- do_colorband(ma->ramp_spec, fac, col);
+ BKE_colorband_evaluate(ma->ramp_spec, fac, col);
/* blending method */
fac= col[3]*ma->rampfac_spec;
@@ -1055,7 +1053,7 @@ static void do_specular_ramp(ShadeInput *shi, float is, float t, float spec[3])
break;
}
- do_colorband(ma->ramp_spec, fac, col);
+ BKE_colorband_evaluate(ma->ramp_spec, fac, col);
/* blending method */
fac= col[3]*ma->rampfac_spec;