Patch from Ed Halley to ensure transmissivity values get the right

defaults.
This commit is contained in:
2006-06-25 15:46:03 +00:00
parent 1fa183c27e
commit dd064b5990
2 changed files with 4 additions and 2 deletions

View File

@@ -5486,8 +5486,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
/* stucci returns intensity from now on */
for(ma= main->mat.first; ma; ma= ma->id.next) {
/* stucci returns intensity from now on */
int a;
for(a=0; a<MAX_MTEX; a++) {
if(ma->mtex[a] && ma->mtex[a]->tex) {
@@ -5496,6 +5496,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
ma->mtex[a]->mapto &= ~(MAP_COL|MAP_SPEC|MAP_REF);
}
}
/* transmissivity defaults */
if(ma->tx_falloff==0.0) ma->tx_falloff= 1.0;
}
/* during 2.41 images with this name were used for viewer node output, lets fix that */

View File

@@ -1548,7 +1548,7 @@ static float shade_by_transmission(Isect *is, ShadeInput *shi, ShadeResult *shr)
return -1;
if (shi->mat->tx_limit <= 0.0) {
d= 0.0;
d= 1.0;
} else {
/* shi.co[] calculated by shade_ray() */
dx= shi->co[0] - is->start[0];