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

Comparing ray/src/rt/m_bsdf.c (file contents):
Revision 2.58 by greg, Wed Jun 3 02:08:32 2020 UTC vs.
Revision 2.60 by greg, Wed Jun 10 16:00:32 2020 UTC

# Line 116 | Line 116 | cmp_psamp(const void *p1, const void *p2)
116   static void
117   compute_through(BSDFDAT *ndp)
118   {
119 < #define NDIR2CHECK      13
119 > #define NDIR2CHECK      29
120          static const float      dir2check[NDIR2CHECK][2] = {
121 <                                        {0, 0},
122 <                                        {-0.8, 0},
123 <                                        {0, 0.8},
124 <                                        {0, -0.8},
125 <                                        {0.8, 0},
126 <                                        {-0.8, 0.8},
127 <                                        {-0.8, -0.8},
128 <                                        {0.8, 0.8},
129 <                                        {0.8, -0.8},
130 <                                        {-1.6, 0},
131 <                                        {0, 1.6},
132 <                                        {0, -1.6},
133 <                                        {1.6, 0},
121 >                                        {0, 0}, {-0.6, 0}, {0, 0.6},
122 >                                        {0, -0.6}, {0.6, 0}, {-0.6, 0.6},
123 >                                        {-0.6, -0.6}, {0.6, 0.6}, {0.6, -0.6},
124 >                                        {-1.2, 0}, {0, 1.2}, {0, -1.2},
125 >                                        {1.2, 0}, {-1.2, 1.2}, {-1.2, -1.2},
126 >                                        {1.2, 1.2}, {1.2, -1.2}, {-1.8, 0},
127 >                                        {0, 1.8}, {0, -1.8}, {1.8, 0},
128 >                                        {-1.8, 1.8}, {-1.8, -1.8}, {1.8, 1.8},
129 >                                        {1.8, -1.8}, {-2.4, 0}, {0, 2.4},
130 >                                        {0, -2.4}, {2.4, 0},
131                                  };
132          const double    peak_over = 1.5;
133          PEAKSAMP        psamp[NDIR2CHECK];
# Line 316 | Line 313 | direct_specular_OK(COLOR cval, FVECT ldir, double omeg
313                  if (tomega2 < .12*tomega)
314                          continue;       /* not safe to include */
315                  cvt_sdcolor(csmp, &sv);
316 <
317 <                if (sf < 2.5*tsr) {     /* weight by Y for small sources */
316 > #if 0
317 >                if (sf < 2.5*tsr) {     /* weight by BSDF for small sources */
318                          scalecolor(csmp, sv.cieY);
319                          wtot += sv.cieY;
320                  } else
321 <                        wtot += 1.;
321 > #endif
322 >                wtot += 1.;
323                  addcolor(cval, csmp);
324          }
325          if (wtot <= FTINY)              /* no valid specular samples? */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines