ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/bsdf_t.c
(Generate patch)

Comparing ray/src/common/bsdf_t.c (file contents):
Revision 3.49 by greg, Sat Mar 27 15:53:01 2021 UTC vs.
Revision 3.52 by greg, Tue Dec 7 23:49:50 2021 UTC

# Line 518 | Line 518 | SDyuv2rgb(double yval, double uprime, double vprime, f
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;
# Line 1430 | Line 1430 | SDloadTre(SDData *sd, ezxml_t wtl)
1430                                          /* separate diffuse components */
1431          extract_diffuse(&sd->rLambFront, sd->rf);
1432          extract_diffuse(&sd->rLambBack, sd->rb);
1433 <        if (sd->tb != NULL)
1434 <                extract_diffuse(&sd->tLamb, sd->tb);
1435 <        if (sd->tf != NULL)
1436 <                extract_diffuse(&sd->tLamb, sd->tf);
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   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines