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

Comparing ray/src/cv/bsdf2ttree.c (file contents):
Revision 2.48 by greg, Thu May 7 16:54:10 2020 UTC vs.
Revision 2.49 by greg, Fri May 8 22:34:21 2020 UTC

# Line 192 | Line 192 | eval_isotropic(char *funame)
192          if (funame != NULL)                     /* need to assign Dx, Dy, Dz? */
193                  assignD = (fundefined(funame) < 6);
194   #if (NSSAMP > 0)
195 <        rtrip = (char *)calloc(sqres, 1);       /* track sample triggerings */
195 >        rtrip = (char *)malloc(sqres);          /* track sample triggerings */
196          ryval = (float *)calloc(sqres, sizeof(float));
197   #endif
198                                                  /* run through directions */
# Line 222 | Line 222 | eval_isotropic(char *funame)
222                          }
223                          sdv_next.cieY = funvalue(funame, 6, iovec);
224                      }
225 +                    /*
226 +                     * Super-sample when we detect a difference from before
227 +                     * or after in this row, or the previous row in this column.
228 +                     * Also super-sample if the previous neighbors performed
229 +                     * super-sampling, regardless of any differences.
230 +                     */
231 +                    memset(rtrip, 0, sqres);
232                      for (oy = 0; oy < sqres; oy++) {
233                          int     trip;
234                          bsdf = sdv_next.cieY;   /* keeping one step ahead... */
# Line 458 | Line 465 | eval_anisotropic(char *funame)
465          if (funame != NULL)                     /* need to assign Dx, Dy, Dz? */
466                  assignD = (fundefined(funame) < 6);
467   #if (NSSAMP > 0)
468 <        rtrip = (char *)calloc(sqres, 1);       /* track sample triggerings */
468 >        rtrip = (char *)malloc(sqres);          /* track sample triggerings */
469          ryval = (float *)calloc(sqres, sizeof(float));
470   #endif
471                                                  /* run through directions */
# Line 487 | Line 494 | eval_anisotropic(char *funame)
494                          }
495                          sdv_next.cieY = funvalue(funame, 6, iovec);
496                      }
497 +                    /*
498 +                     * Super-sample when we detect a difference from before
499 +                     * or after in this row, or the previous row in this column.
500 +                     * Also super-sample if the previous neighbors performed
501 +                     * super-sampling, regardless of any differences.
502 +                     */
503 +                    memset(rtrip, 0, sqres);
504                      for (oy = 0; oy < sqres; oy++) {
505                          int     trip;
506                          bsdf = sdv_next.cieY;   /* keeping one step ahead... */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines