* fix: "only shadow" lamps still lit materials with "shadow" turned off. Now, they have no effect.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user