diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-26 07:13:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-26 07:13:54 +0400 |
commit | af7288c407fbb4bb462f509d5782b660a29c4883 (patch) | |
tree | 9c56d26ed78e2d93284d250c5b270518c329376f /source/blender/render/intern | |
parent | 491526e5ed31bdba3e0a16e0ad6b8b59afb2f8d3 (diff) |
minor edit - weight_to_rgb() and ramp_blend() now take a float vector rather than 3 float pointers.
also make particle draw use a float vec.
Diffstat (limited to 'source/blender/render/intern')
-rw-r--r-- | source/blender/render/intern/source/pixelshading.c | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/render_texture.c | 12 | ||||
-rw-r--r-- | source/blender/render/intern/source/shadeoutput.c | 14 |
3 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c index a78cc3e2288..b62484a6995 100644 --- a/source/blender/render/intern/source/pixelshading.c +++ b/source/blender/render/intern/source/pixelshading.c @@ -587,7 +587,7 @@ void shadeSunView(float col_r[3], const float view[3]) xyz_to_rgb(colorxyz[0], colorxyz[1], colorxyz[2], &sun_collector[0], &sun_collector[1], &sun_collector[2], lar->sunsky->sky_colorspace); - ramp_blend(lar->sunsky->skyblendtype, col_r, col_r+1, col_r+2, lar->sunsky->skyblendfac, sun_collector); + ramp_blend(lar->sunsky->skyblendtype, col_r, lar->sunsky->skyblendfac, sun_collector); } } } diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c index 277ef90b9ab..9459745cdbc 100644 --- a/source/blender/render/intern/source/render_texture.c +++ b/source/blender/render/intern/source/render_texture.c @@ -1484,32 +1484,32 @@ void texture_rgb_blend(float in[3], const float tex[3], const float out[3], floa case MTEX_BLEND_HUE: fact*= facg; copy_v3_v3(in, out); - ramp_blend(MA_RAMP_HUE, in, in+1, in+2, fact, tex); + ramp_blend(MA_RAMP_HUE, in, fact, tex); break; case MTEX_BLEND_SAT: fact*= facg; copy_v3_v3(in, out); - ramp_blend(MA_RAMP_SAT, in, in+1, in+2, fact, tex); + ramp_blend(MA_RAMP_SAT, in, fact, tex); break; case MTEX_BLEND_VAL: fact*= facg; copy_v3_v3(in, out); - ramp_blend(MA_RAMP_VAL, in, in+1, in+2, fact, tex); + ramp_blend(MA_RAMP_VAL, in, fact, tex); break; case MTEX_BLEND_COLOR: fact*= facg; copy_v3_v3(in, out); - ramp_blend(MA_RAMP_COLOR, in, in+1, in+2, fact, tex); + ramp_blend(MA_RAMP_COLOR, in, fact, tex); break; case MTEX_SOFT_LIGHT: fact*= facg; copy_v3_v3(in, out); - ramp_blend(MA_RAMP_SOFT, in, in+1, in+2, fact, tex); + ramp_blend(MA_RAMP_SOFT, in, fact, tex); break; case MTEX_LIN_LIGHT: fact*= facg; copy_v3_v3(in, out); - ramp_blend(MA_RAMP_LINEAR, in, in+1, in+2, fact, tex); + ramp_blend(MA_RAMP_LINEAR, in, fact, tex); break; } } diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c index b58a6695fd6..4d654beb287 100644 --- a/source/blender/render/intern/source/shadeoutput.c +++ b/source/blender/render/intern/source/shadeoutput.c @@ -908,7 +908,7 @@ static void ramp_diffuse_result(float *diff, ShadeInput *shi) /* blending method */ fac= col[3]*ma->rampfac_col; - ramp_blend(ma->rampblend_col, diff, diff+1, diff+2, fac, col); + ramp_blend(ma->rampblend_col, diff, fac, col); } } } @@ -955,7 +955,7 @@ static void add_to_diffuse(float *diff, ShadeInput *shi, float is, float r, floa colt[1]= shi->g; colt[2]= shi->b; - ramp_blend(ma->rampblend_col, colt, colt+1, colt+2, fac, col); + ramp_blend(ma->rampblend_col, colt, fac, col); /* output to */ diff[0] += r * colt[0]; @@ -970,20 +970,20 @@ static void add_to_diffuse(float *diff, ShadeInput *shi, float is, float r, floa } } -static void ramp_spec_result(float *specr, float *specg, float *specb, ShadeInput *shi) +static void ramp_spec_result(float spec_col[3], ShadeInput *shi) { Material *ma= shi->mat; if(ma->ramp_spec && (ma->rampin_spec==MA_RAMP_IN_RESULT)) { float col[4]; - float fac= 0.3f*(*specr) + 0.58f*(*specg) + 0.12f*(*specb); + float fac= 0.3f*spec_col[0] + 0.58f*spec_col[1] + 0.12f*spec_col[2]; do_colorband(ma->ramp_spec, fac, col); /* blending method */ fac= col[3]*ma->rampfac_spec; - ramp_blend(ma->rampblend_spec, specr, specg, specb, fac, col); + ramp_blend(ma->rampblend_spec, spec_col, fac, col); } } @@ -1023,7 +1023,7 @@ static void do_specular_ramp(ShadeInput *shi, float is, float t, float spec[3]) /* blending method */ fac= col[3]*ma->rampfac_spec; - ramp_blend(ma->rampblend_spec, spec, spec+1, spec+2, fac, col); + ramp_blend(ma->rampblend_spec, spec, fac, col); } } @@ -1873,7 +1873,7 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr) if(ma->mode & MA_RAMP_COL) ramp_diffuse_result(shr->combined, shi); } - if(ma->mode & MA_RAMP_SPEC) ramp_spec_result(shr->spec, shr->spec+1, shr->spec+2, shi); + if(ma->mode & MA_RAMP_SPEC) ramp_spec_result(shr->spec, shi); /* refcol is for envmap only */ if(shi->refcol[0]!=0.0f) { |