Fix [#21861] hemi light and shadow only maerial
authorMatt Ebb <matt@mke3.net>
Mon, 5 Apr 2010 05:46:39 +0000 (05:46 +0000)
committerMatt Ebb <matt@mke3.net>
Mon, 5 Apr 2010 05:46:39 +0000 (05:46 +0000)
Made Shadow only materials render as completely transparent when there are no
shadow casting lamps - more logical than solid black.

source/blender/render/intern/source/shadeoutput.c

index 0e4148ac69272e0283a24e95d9b31d3dbfd3dcb0..806cafaf89b4cadf9215481592fa343f0eba4969 100644 (file)
@@ -1534,7 +1534,7 @@ static void shade_lamp_loop_only_shadow(ShadeInput *shi, ShadeResult *shr)
                        accum/= ir;
                        shr->alpha= (shi->mat->alpha)*(1.0f-accum);
                }
-               else shr->alpha= shi->mat->alpha;
+               else shr->alpha= 0.f;
        }
        
        /* quite disputable this...  also note it doesn't mirror-raytrace */