| 34 |
|
#define NALT 11 /* # sampling altitude angles */ |
| 35 |
|
#endif |
| 36 |
|
#ifndef NAZI |
| 37 |
< |
#define NAZI ((int)(PI/2.*NALT+.5)) |
| 37 |
> |
#define NAZI 17 |
| 38 |
|
#endif |
| 39 |
|
|
| 40 |
|
typedef struct dlights { |
| 320 |
|
/* avg. reflected brightness */ |
| 321 |
|
d = AVGREFL / (double)ncells; |
| 322 |
|
scalecolor(csum, d); |
| 323 |
< |
if (tmCvColors(&dlightsets->larb, TM_NOCHROM, &csum, 1) != TM_E_OK) |
| 323 |
> |
if (tmCvColors(tmGlobal, &dlightsets->larb, |
| 324 |
> |
TM_NOCHROM, &csum, 1) != TM_E_OK) |
| 325 |
|
error(CONSISTENCY, "tone mapping problem in ssph_compute"); |
| 326 |
|
/* greedy light source clustering */ |
| 327 |
|
while (dlightsets->nl < MAXLIGHTS) { |
| 556 |
|
} |
| 557 |
|
return(somechange); |
| 558 |
|
toomany: |
| 558 |
– |
/* return(cmderror(cn, "too many arguments")); *//* XXX cmderror is void */ |
| 559 |
|
cmderror(cn, "too many arguments"); |
| 560 |
< |
return 0; /* XXX not sure if this is the right return value */ |
| 560 |
> |
return(-1); |
| 561 |
|
} |
| 562 |
|
|
| 563 |
|
|
| 957 |
|
BYTE pval; |
| 958 |
|
double expval, d; |
| 959 |
|
/* use computed sources */ |
| 960 |
< |
if (tmMapPixels(&pval, &op->ol->larb, TM_NOCHROM, 1) |
| 961 |
< |
!= TM_E_OK) |
| 960 |
> |
if (tmMapPixels(tmGlobal, &pval, &op->ol->larb, |
| 961 |
> |
TM_NOCHROM, 1) != TM_E_OK) |
| 962 |
|
error(CONSISTENCY, "dobj_render w/o tone map"); |
| 963 |
|
expval = pval * (WHTEFFICACY/256.) / |
| 964 |
|
tmLuminance(op->ol->larb); |