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

Comparing ray/src/rt/pmapmat.c (file contents):
Revision 2.25 by greg, Tue Dec 3 19:36:58 2024 UTC vs.
Revision 2.26 by greg, Thu Dec 19 23:25:28 2024 UTC

# Line 335 | Line 335 | static int normalPhotonScatter (OBJREC *mat, RAY *rayI
335     if ((nd.alpha2 *= nd.alpha2) <= FTINY)
336        nd.specfl |= SP_PURE;
337        
338   if (rayIn -> ro != NULL && isflat(rayIn -> ro -> otype))
339      nd.specfl |= SP_FLAT;  
340      
338     /* Perturb normal */
339     if ((hastexture = (DOT(rayIn -> pert, rayIn -> pert) > sqr(FTINY)) ))
340        nd.pdot = raynormal(nd.pnorm, rayIn);
# Line 346 | Line 343 | static int normalPhotonScatter (OBJREC *mat, RAY *rayI
343        nd.pdot = rayIn -> rod;
344     }
345    
346 <   nd.pdot = max(nd.pdot, .001);
346 >    if (!hastexture && rayIn -> ro != NULL && isflat(rayIn -> ro -> otype))
347 >      nd.specfl |= SP_FLAT;
348 >
349 >  nd.pdot = max(nd.pdot, .001);
350        
351     /* Modify material color */
352     multcolor(nd.mcolor, rayIn -> pcol);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines