* 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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user