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

Comparing ray/src/px/pcond4.c (file contents):
Revision 3.10 by greg, Fri Oct 11 10:23:59 1996 UTC vs.
Revision 3.11 by greg, Thu Jan 9 13:56:32 1997 UTC

# Line 14 | Line 14 | static char SCCSid[] = "$SunId$ LBL";
14  
15   #define VADAPT          0.08            /* fraction of adaptation from veil */
16  
17 < extern COLOR    *fovimg;                /* foveal (1 degree) averaged image */
18 < extern short    fvxr, fvyr;             /* foveal image resolution */
17 > static COLOR    *veilimg = NULL;        /* veiling image */
18  
20 #define fovscan(y)      (fovimg+(y)*fvxr)
21
22 static COLOR    *veilimg;               /* veiling image */
23
19   #define veilscan(y)     (veilimg+(y)*fvxr)
20  
21   static float    (*raydir)[3] = NULL;    /* ray direction for each pixel */
# Line 83 | Line 78 | compveil()                             /* compute veiling image */
78          COLOR   ctmp, vsum;
79          int     px, py;
80          register int    x, y;
81 +
82 +        if (veilimg != NULL)            /* already done? */
83 +                return;
84                                          /* compute ray directions */
85          compraydir();
86                                          /* compute veil image */
# Line 113 | Line 111 | compveil()                             /* compute veiling image */
111                          scalecolor(vsum, VADAPT/t2sum);
112                          copycolor(veilscan(py)[px], vsum);
113                  }
114 +                                        /* modify FOV sample image */
115 +        for (y = 0; y < fvyr; y++)
116 +                for (x = 0; x < fvxr; x++) {
117 +                        scalecolor(fovscan(y)[x], 1.-VADAPT);
118 +                        addcolor(fovscan(y)[x], veilscan(y)[x]);
119 +                }
120 +        comphist();                     /* recompute histogram */
121   }
122  
123  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines