Fix T41957: Shadow color texture mapping was using wrong factor

This commit is contained in:
Sergey Sharybin 2014-10-07 12:30:23 +02:00
parent d7a1b09f85
commit 025955e549
Notes: blender-bot 2023-02-14 10:02:32 +01:00
Referenced by issue #41957, lamp error: shadow influence
1 changed files with 5 additions and 2 deletions

View File

@ -3396,8 +3396,11 @@ void do_lamp_tex(LampRen *la, const float lavec[3], ShadeInput *shi, float col_r
col[0]= texres.tr*la->energy;
col[1]= texres.tg*la->energy;
col[2]= texres.tb*la->energy;
texture_rgb_blend(col_r, col, col_r, texres.tin, mtex->colfac, mtex->blendtype);
if (effect & LA_SHAD_TEX)
texture_rgb_blend(col_r, col, col_r, texres.tin, mtex->shadowfac, mtex->blendtype);
else
texture_rgb_blend(col_r, col, col_r, texres.tin, mtex->colfac, mtex->blendtype);
}
}
}