* fix: "only shadow" lamps still lit materials with "shadow" turned off. Now, they have no effect.

This commit is contained in:
Matt Ebb
2008-02-07 06:00:08 +00:00
parent bb7690c729
commit f9593a4f89

View File

@@ -1186,8 +1186,11 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int
vn= shi->vn;
view= shi->view;
if (lar->energy == 0.0) return;
if (lar->energy == 0.0) return;
/* only shadow lamps shouldn't affect shadow-less materials at all */
if ((lar->mode & LA_ONLYSHADOW) && (!(ma->mode & MA_SHADOW) || !(R.r.mode & R_SHADOW)))
return;
/* optimisation, don't render fully black lamps */
if (!(lar->mode & LA_TEXTURE) && (lar->r + lar->g + lar->b == 0.0f))
return;