--- ray/src/rt/rpict.c 1993/12/22 21:03:54 2.37 +++ ray/src/rt/rpict.c 1995/12/08 18:49:20 2.41 @@ -1,4 +1,4 @@ -/* Copyright (c) 1993 Regents of the University of California */ +/* Copyright (c) 1995 Regents of the University of California */ #ifndef lint static char SCCSid[] = "$SunId$ LBL"; @@ -64,9 +64,16 @@ int vspretest = 512; /* virtual source pretest dens int directvis = 1; /* sources visible? */ double srcsizerat = .25; /* maximum ratio source size/dist. */ +COLOR cextinction = BLKCOLOR; /* global extinction coefficient */ +double salbedo = 0.; /* global scattering albedo */ +double seccg = 0.; /* global scattering eccentricity */ +double ssampdist = 0.; /* scatter sampling distance */ + double specthresh = .15; /* specular sampling threshold */ double specjitter = 1.; /* specular sampling jitter */ +int backvis = 1; /* back face visibility */ + int maxdepth = 6; /* maximum recursion depth */ double minweight = 5e-3; /* minimum ray weight */ @@ -500,7 +507,7 @@ int xres, y, xstep; b = fillsample(scanline, zline, 0, y, i, 0, b/2); else b = fillsample(scanline+i-xstep, - zline ? zline+i-xstep : NULL, + zline ? zline+i-xstep : (float *)NULL, i-xstep, y, xstep, 0, b/2); if (sd) *sd++ = nc & 1 ? bl : b; bl = b; @@ -528,7 +535,7 @@ int xres, y, ysize; zline[ysize] = zbar[ysize][i]; } - b = fillsample(vline, zbar[0] ? zline : NULL, + b = fillsample(vline, zbar[0] ? zline : (float *)NULL, i, y, 0, ysize, b/2); for (j = 1; j < ysize; j++) @@ -586,7 +593,8 @@ int b; /* recurse */ ncut += fillsample(colline, zline, x, y, xlen>>1, ylen>>1, (b-1)/2); - ncut += fillsample(colline+(len>>1), zline ? zline+(len>>1) : NULL, + ncut += fillsample(colline+(len>>1), + zline ? zline+(len>>1) : (float *)NULL, x+(xlen>>1), y+(ylen>>1), xlen-(xlen>>1), ylen-(ylen>>1), b/2); @@ -601,8 +609,8 @@ int x, y; /* pixel position */ { static RAY thisray; - if (viewray(thisray.rorg, thisray.rdir, &ourview, - (x+pixjitter())/hres, (y+pixjitter())/vres) < 0) { + if ((thisray.rmax = viewray(thisray.rorg, thisray.rdir, &ourview, + (x+pixjitter())/hres, (y+pixjitter())/vres)) < -FTINY) { setcolor(col, 0.0, 0.0, 0.0); return(0.0); }