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

Comparing ray/src/hd/rhpict2.c (file contents):
Revision 3.4 by gwlarson, Mon Mar 8 17:34:24 1999 UTC vs.
Revision 3.5 by gwlarson, Tue Mar 9 11:41:29 1999 UTC

# Line 120 | Line 120 | int    n;
120          int     d;
121          register int4   i, p;
122  
123 <        if (n <= 0)
123 >        if (n <= 0) {
124 > #ifdef DEBUG
125 >                error(WARNING, "neighborless sample in kill_occl");
126 > #endif
127                  return(1);
128 +        }
129          p = v*hres + h;
130          forequad[0][0] = forequad[0][1] = forequad[1][0] = forequad[1][1] = 0;
131          for (i = n; i--; ) {
# Line 147 | Line 151 | int    n;
151          int     dis[NNEIGH], ndis;
152          COLOR   mykern[MAXRAD2];
153          int4    maxr2;
154 <        double  w, d;
154 >        double  d;
155          register int4   p, r2;
156          int     i, r, maxr, h2, v2;
157  
# Line 192 | Line 196 | int    n;
196                          }
197                          if (i >= 0) continue;   /* outside edge */
198                          addcolor(mypixel[v2*hres+h2], mykern[r2]);
199 <                        myweight[v2*hres+h2] += pixWeight[r2] *
196 <                                                        myweight[v*hres+h];
199 >                        myweight[v2*hres+h2] += pixWeight[r2] * myweight[p];
200                  }
201          }
202          return(1);
# Line 202 | Line 205 | int    n;
205  
206   pixFlush()                      /* done with beams -- flush pixel values */
207   {
208 +        if (pixWeight[0] <= FTINY)
209 +                init_wfunc();           /* initialize weighting function */
210          reset_flags();                  /* set occupancy flags */
211          meet_neighbors(kill_occl);      /* eliminate occlusion errors */
212          reset_flags();                  /* reset occupancy flags */
208        if (pixWeight[0] <= FTINY)
209                init_wfunc();           /* initialize weighting function */
213          meet_neighbors(grow_samp);      /* grow valid samples over image */
214          free((char *)pixFlags);         /* free pixel flags */
215          pixFlags = NULL;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines