* Removed the volume 'layer depth' control' (was used to

limit ray intersections like as for ray transparency). It 
remains to be seen if it's even that useful, and was 
preventing refracting materials behind volumes from 
working easily.
This commit is contained in:
Matt Ebb
2008-09-30 10:41:47 +00:00
parent 31d6a6be68
commit a667fc61d4
4 changed files with 3 additions and 8 deletions

View File

@@ -172,7 +172,6 @@ void init_material(Material *ma)
ma->vol_absorption = 1.0f;
ma->vol_scattering = 1.0f;
ma->vol_absorption_col[0] = ma->vol_absorption_col[1] = ma->vol_absorption_col[2] = 0.0f;
ma->vol_raydepth = 15;
ma->mode= MA_TRACEBLE|MA_SHADBUF|MA_SHADOW|MA_RADIO|MA_RAYBIAS|MA_TANGENT_STR;

View File

@@ -7888,8 +7888,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
ma->vol_stepsize = 0.2f;
ma->vol_absorption = 1.0f;
ma->vol_scattering = 1.0f;
ma->vol_absorption_col[0] = ma->vol_absorption_col[1] = ma->vol_absorption_col[2] = 0.0f;
if (ma->vol_raydepth == 0) ma->vol_raydepth = 15;
ma->vol_absorption_col[0] = ma->vol_absorption_col[1] = ma->vol_absorption_col[2] = 0.0f;
}
}
}

View File

@@ -70,9 +70,8 @@ typedef struct Material {
float vol_stepsize, vol_shade_stepsize;
float vol_absorption, vol_scattering;
float vol_absorption_col[3];
short vol_raydepth;
short vol_shadeflag;
int volpad;
short volpad[3];
float fresnel_mir, fresnel_mir_i;
float fresnel_tra, fresnel_tra_i;

View File

@@ -436,7 +436,6 @@ static void shade_intersection(ShadeInput *shi, float *col, Isect *is)
shi_new.mask= shi->mask;
shi_new.osatex= shi->osatex;
shi_new.depth= shi->depth + 1;
shi_new.thread= shi->thread;
shi_new.xs= shi->xs;
shi_new.ys= shi->ys;
@@ -450,8 +449,7 @@ static void shade_intersection(ShadeInput *shi, float *col, Isect *is)
memset(&shr_new, 0, sizeof(ShadeResult));
if (shi->depth < shi->mat->vol_raydepth)
shade_ray(is, &shi_new, &shr_new);
shade_ray(is, &shi_new, &shr_new);
col[0] = shr_new.combined[0];
col[1] = shr_new.combined[1];