518 |
|
/* Query BSDF value and sample hypercube for the given vectors */ |
519 |
|
static int |
520 |
|
SDqueryTre(const SDTre *sdt, float *coef, |
521 |
< |
const FVECT outVec, const FVECT inVec, double *hc) |
521 |
> |
const FVECT inVec, const FVECT outVec, double *hc) |
522 |
|
{ |
523 |
|
const RREAL *vtmp; |
524 |
|
float yval; |
1430 |
|
/* separate diffuse components */ |
1431 |
|
extract_diffuse(&sd->rLambFront, sd->rf); |
1432 |
|
extract_diffuse(&sd->rLambBack, sd->rb); |
1433 |
< |
if (sd->tf != NULL) |
1434 |
< |
extract_diffuse(&sd->tLamb, sd->tf); |
1435 |
< |
if (sd->tb != NULL) |
1436 |
< |
extract_diffuse(&sd->tLamb, sd->tb); |
1433 |
> |
extract_diffuse(&sd->tLambFront, sd->tf); |
1434 |
> |
if (sd->tb != NULL) { |
1435 |
> |
extract_diffuse(&sd->tLambBack, sd->tb); |
1436 |
> |
if (sd->tf == NULL) |
1437 |
> |
sd->tLambFront = sd->tLambBack; |
1438 |
> |
} else if (sd->tf != NULL) |
1439 |
> |
sd->tLambBack = sd->tLambFront; |
1440 |
|
/* return success */ |
1441 |
|
return SDEnone; |
1442 |
|
} |