Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIRIE Shinsuke <irieshinsuke@yahoo.co.jp>2014-05-30 17:11:06 +0400
committerIRIE Shinsuke <irieshinsuke@yahoo.co.jp>2014-06-05 11:08:15 +0400
commit650f1d0a6fc8aaff4b1b5d92e49ee0764f94dc5a (patch)
treee8f0d48841de39f9917d5774df5a5c79a091a5fd /source/blender/render
parent5474dfe70168be6918054964663ac7f815372042 (diff)
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.
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/shadeoutput.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index cc781c863a0..ebf88efb50b 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;
}