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

Comparing ray/src/common/tonemap.c (file contents):
Revision 3.47 by greg, Wed Apr 7 21:13:52 2021 UTC vs.
Revision 3.48 by greg, Wed Apr 7 23:12:19 2021 UTC

# Line 439 | Line 439 | double  Lddyn
439          for (i = tms->mbrmax-tms->mbrmin+1; i--; ) {
440                  double  d;
441                  d = expmult/tms->inpsf * tmLuminance(tms->mbrmin + i);
442 <                if (d <= minD)
443 <                        break;          /* map initialized to zeroes */
444 <                d = (d - minD)/(1. - minD);
442 >                if (d >= 2.*minD)
443 >                        d -= minD;
444 >                else                    /* soft black crushing */
445 >                        d *= d/(4.*minD);
446 >                d /= 1. - minD;
447                  d = TM_BRES*pow(d, 1./gamval);
448                  tms->lumap[i] = (d > maxV) ? maxV : (int)d;
449          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines