--- ray/src/gen/mkillum3.c 1991/07/25 10:59:09 1.2 +++ ray/src/gen/mkillum3.c 1991/08/23 12:30:35 1.5 @@ -96,7 +96,6 @@ FVECT u, v, w; FILE *dfp; int i; - average(il, da, n*m); if (il->flags & IL_COLDST) { printf("\n%s %s %s%s", VOIDID, ofun[PAT_CDATA].funame, il->matname, DSTSUF); @@ -135,7 +134,6 @@ int n, m; FILE *dfp; int i; - average(il, da, n*m); if (il->flags & IL_COLDST) { printf("\n%s %s %s%s", VOIDID, ofun[PAT_CDATA].funame, il->matname, DSTSUF); @@ -169,8 +167,11 @@ OBJREC *ob; { double cout[3]; - printf("\n%s%s %s %s", il->matname, DSTSUF, - ofun[il->flags&IL_LIGHT?MAT_LIGHT:MAT_ILLUM].funame, + if (il->sampdens <= 0) + printf("\n%s ", VOIDID); + else + printf("\n%s%s ", il->matname, DSTSUF); + printf("%s %s", ofun[il->flags&IL_LIGHT?MAT_LIGHT:MAT_ILLUM].funame, il->matname); if (il->flags & IL_LIGHT || !strcmp(il->altmat,VOIDID)) printf("\n0"); @@ -183,10 +184,7 @@ OBJREC *ob; } else { cout[0] = cout[1] = cout[2] = brt(il->col); } - if (il->flags & IL_LIGHT) - printf("\n3 %f %f %f\n", cout[0], cout[1], cout[2]); - else - printf("\n4 %f %f %f 0\n", cout[0], cout[1], cout[2]); + printf("\n0\n3 %f %f %f\n", cout[0], cout[1], cout[2]); printobj(il->matname, ob); } @@ -208,6 +206,8 @@ int n; } for (i = 0; i < 3; i++) il->col[i] /= (double)n*il->nsamps; + + return(brt(il->col) >= il->minbrt); }