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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-04-29 17:51:47 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-04-29 17:51:47 +0400
commitd5bfb1b6d937626ef6525a67c591f1f61b3aaa52 (patch)
tree0cfc207e6699a6a52bc5f527027b34ead40f8b3b /source/blender/render
parent837099171018c529e80a62bbd9d545e262c2aeba (diff)
Fix for bug #8949: diffuse tangent shading did not use correctly
normalized normal. Patch by André Pinto, thanks!
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/shadeoutput.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index 629d60bdffc..d6a256dc80b 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -1236,6 +1236,7 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int
else {
Crossf(cross, lv, vn);
Crossf(vnor, cross, vn);
+ Normalize(vnor);
}
if(ma->strand_surfnor > 0.0f) {
@@ -1253,6 +1254,7 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int
float cross[3];
Crossf(cross, lv, shi->tang);
Crossf(vnor, cross, shi->tang);
+ Normalize(vnor);
vnor[0]= -vnor[0];vnor[1]= -vnor[1];vnor[2]= -vnor[2];
vn= vnor;
}