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@gmail.com>2014-05-28 18:20:12 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2014-05-28 18:41:48 +0400
commit4d1ec4d9c705fefafc0e46721c405f2f2c5ff1ba (patch)
tree4eb77839442a5b3b2388ad9227dc9077cd857a00
parent7c8be33d14a3de8f0dfff91bf3e9dc55f81d0c30 (diff)
Fix T40386: cycles anisotropic BSDF difference between SVM and OSL.
-rw-r--r--intern/cycles/kernel/shaders/node_geometry.osl8
1 files changed, 2 insertions, 6 deletions
diff --git a/intern/cycles/kernel/shaders/node_geometry.osl b/intern/cycles/kernel/shaders/node_geometry.osl
index dbdf55802ae..7bef2051865 100644
--- a/intern/cycles/kernel/shaders/node_geometry.osl
+++ b/intern/cycles/kernel/shaders/node_geometry.osl
@@ -49,12 +49,8 @@ shader node_geometry(
/* try to create spherical tangent from generated coordinates */
if (getattribute("geom:generated", generated)) {
- matrix project = matrix(0.0, 1.0, 0.0, 0.0,
- -1.0, 0.0, 0.0, 0.0,
- 0.0, 0.0, 0.0, 0.0,
- 0.5, -0.5, 0.0, 1.0);
-
- vector T = transform("object", "world", transform(project, generated));
+ normal data = normal(-(generated[1]-0.5), (generated[0]-0.5), 0.0);
+ vector T = transform("object", "world", data);
Tangent = cross(Normal, normalize(cross(T, Normal)));
}
else {