Three-fixes-in-one:
#5417: Only Shadow material gave shadow outside of Spot bundle #5414: Material Nodes: sockets without input were always treated as single value inputs, ignoring color or vector. (Caused by commit to do automatic conversions of socket links). #5420: When reading with old Blender a new file that has a new window type, saving it over, and read back in current Blender, the window type should be reset to EMPTY, because all its data got lost.
This commit is contained in:
@@ -1373,22 +1373,26 @@ static void shade_lamp_loop_only_shadow(ShadeInput *shi, ShadeResult *shr)
|
||||
|
||||
if(lar->shb || (lar->mode & LA_SHAD_RAY)) {
|
||||
visifac= lamp_get_visibility(lar, shi->co, lv, &lampdist);
|
||||
if(visifac < 0.0f)
|
||||
if(visifac <= 0.0f) {
|
||||
ir+= 1.0f;
|
||||
accum+= 1.0f;
|
||||
continue;
|
||||
|
||||
}
|
||||
inpr= INPR(shi->vn, lv);
|
||||
if(inpr <= 0.0f)
|
||||
continue;
|
||||
|
||||
lamp_get_shadow(lar, shi, inpr, shadfac, shi->depth);
|
||||
|
||||
ir+= 1.0f;
|
||||
accum+= shadfac[3];
|
||||
accum+= (1.0f-visifac) + (visifac)*shadfac[3];
|
||||
}
|
||||
}
|
||||
if(ir>0.0f) {
|
||||
accum/= ir;
|
||||
shr->alpha= (shi->alpha)*(1.0f-accum);
|
||||
shr->alpha= (shi->mat->alpha)*(1.0f-accum);
|
||||
}
|
||||
else shr->alpha= shi->mat->alpha;
|
||||
}
|
||||
|
||||
/* quite disputable this... also note it doesn't mirror-raytrace */
|
||||
|
||||
Reference in New Issue
Block a user