code cleanup: replace VECADDISFAC with math function.
This commit is contained in:
@@ -87,12 +87,6 @@ extern struct Render R;
|
||||
*
|
||||
*/
|
||||
|
||||
#define VECADDISFAC(v1,v3,fac) { \
|
||||
*(v1 + 0) += *(v3 + 0) * (fac); \
|
||||
*(v1 + 1) += *(v3 + 1) * (fac); \
|
||||
*(v1 + 2) += *(v3 + 2) * (fac); \
|
||||
} (void)0
|
||||
|
||||
/* initialize material variables in shadeinput,
|
||||
* doing inverse gamma correction where applicable */
|
||||
void shade_input_init_material(ShadeInput *shi)
|
||||
@@ -121,13 +115,13 @@ void shade_material_loop(ShadeInput *shi, ShadeResult *shr)
|
||||
shi->depth--;
|
||||
|
||||
/* a couple of passes */
|
||||
VECADDISFAC(shr->combined, shr_t.combined, fac);
|
||||
madd_v3_v3fl(shr->combined, shr_t.combined, fac);
|
||||
if (shi->passflag & SCE_PASS_SPEC)
|
||||
VECADDISFAC(shr->spec, shr_t.spec, fac);
|
||||
madd_v3_v3fl(shr->spec, shr_t.spec, fac);
|
||||
if (shi->passflag & SCE_PASS_DIFFUSE)
|
||||
VECADDISFAC(shr->diff, shr_t.diff, fac);
|
||||
madd_v3_v3fl(shr->diff, shr_t.diff, fac);
|
||||
if (shi->passflag & SCE_PASS_SHADOW)
|
||||
VECADDISFAC(shr->shad, shr_t.shad, fac);
|
||||
madd_v3_v3fl(shr->shad, shr_t.shad, fac);
|
||||
|
||||
negate_v3(shi->vn);
|
||||
negate_v3(shi->facenor);
|
||||
|
||||
Reference in New Issue
Block a user