[Bf-blender-cvs] [650f1d0] master: Blender Internal: Fix for lamp option "Specular" not working when "Only Shadow" is enabled.
IRIE Shinsuke
noreply at git.blender.org
Thu Jun 5 09:08:24 CEST 2014
Commit: 650f1d0a6fc8aaff4b1b5d92e49ee0764f94dc5a
Author: IRIE Shinsuke
Date: Fri May 30 22:11:06 2014 +0900
https://developer.blender.org/rB650f1d0a6fc8aaff4b1b5d92e49ee0764f94dc5a
Blender Internal: Fix for lamp option "Specular" not working when "Only Shadow" is enabled.
This is followup to rB8008d9bdfd57. Blender Render and GLSL preview
now produce the same results.
===================================================================
M source/blender/render/intern/source/shadeoutput.c
===================================================================
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index cc781c8..ebf88ef 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -1466,9 +1466,11 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int
shr->shad[1] -= shadfac[3]*shi->g*(1.0f-lashdw[1]);
shr->shad[2] -= shadfac[3]*shi->b*(1.0f-lashdw[2]);
- shr->spec[0] -= shadfac[3]*shi->specr*(1.0f-lashdw[0]);
- shr->spec[1] -= shadfac[3]*shi->specg*(1.0f-lashdw[1]);
- shr->spec[2] -= shadfac[3]*shi->specb*(1.0f-lashdw[2]);
+ if (!(lar->mode & LA_NO_SPEC)) {
+ shr->spec[0] -= shadfac[3]*shi->specr*(1.0f-lashdw[0]);
+ shr->spec[1] -= shadfac[3]*shi->specg*(1.0f-lashdw[1]);
+ shr->spec[2] -= shadfac[3]*shi->specb*(1.0f-lashdw[2]);
+ }
return;
}
More information about the Bf-blender-cvs
mailing list