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

Comparing ray/src/rt/source.c (file contents):
Revision 2.60 by greg, Mon Feb 14 20:13:38 2011 UTC vs.
Revision 2.61 by greg, Tue Aug 2 22:47:30 2011 UTC

# Line 99 | Line 99 | marksources(void)                      /* find and mark source objects */
99                                  m->otype == MAT_SPOT ? 7 : 3))
100                          objerror(m, USER, "bad # arguments");
101  
102                if (m->otype == MAT_GLOW &&
103                                o->otype != OBJ_SOURCE &&
104                                m->oargs.farg[3] <= FTINY)
105                        continue;                       /* don't bother */
102                  if (m->oargs.farg[0] <= FTINY && m->oargs.farg[1] <= FTINY &&
103                                  m->oargs.farg[2] <= FTINY)
104                          continue;                       /* don't bother */
105 <
105 >                if (m->otype == MAT_GLOW &&
106 >                                o->otype != OBJ_SOURCE &&
107 >                                m->oargs.farg[3] <= FTINY) {
108 >                        foundsource += (ambounce > 0);
109 >                        continue;                       /* don't track these */
110 >                }
111                  if (sfun[o->otype].of == NULL ||
112                                  sfun[o->otype].of->setsrc == NULL)
113                          objerror(o, USER, "illegal material");
# Line 119 | Line 120 | marksources(void)                      /* find and mark source objects */
120                  if (m->otype == MAT_GLOW) {
121                          source[ns].sflags |= SPROX;
122                          source[ns].sl.prox = m->oargs.farg[3];
123 <                        if (source[ns].sflags & SDISTANT)
123 >                        if (source[ns].sflags & SDISTANT) {
124                                  source[ns].sflags |= SSKIP;
125 +                                foundsource += (ambounce > 0);
126 +                        }
127                  } else if (m->otype == MAT_SPOT) {
128                          source[ns].sflags |= SSPOT;
129                          if ((source[ns].sl.s = makespot(m)) == NULL)
# Line 135 | Line 138 | marksources(void)                      /* find and mark source objects */
138   #if  SHADCACHE
139                  initobscache(ns);
140   #endif
141 <                if (!(source[ns].sflags & SSKIP))
139 <                        foundsource++;
141 >                foundsource += !(source[ns].sflags & SSKIP);
142          }
143          if (!foundsource) {
144                  error(WARNING, "no light sources found");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines