[Bf-blender-cvs] [d68521d] master: Cycles: Fix difference between SVM and OSL implementation of Normal node

Sergey Sharybin noreply at git.blender.org
Wed Dec 10 15:15:07 CET 2014


Commit: d68521df7bb18204a4ccadd3a48fe75e794ac4ad
Author: Sergey Sharybin
Date:   Wed Dec 10 19:07:26 2014 +0500
Branches: master
https://developer.blender.org/rBd68521df7bb18204a4ccadd3a48fe75e794ac4ad

Cycles: Fix difference between SVM and OSL implementation of Normal node

SVM was normalizing the input normal, OSL did not. This lead to render
result differences across this shading systems.

===================================================================

M	intern/cycles/kernel/shaders/node_normal.osl

===================================================================

diff --git a/intern/cycles/kernel/shaders/node_normal.osl b/intern/cycles/kernel/shaders/node_normal.osl
index 14af044..002eddb 100644
--- a/intern/cycles/kernel/shaders/node_normal.osl
+++ b/intern/cycles/kernel/shaders/node_normal.osl
@@ -23,6 +23,6 @@ shader node_normal(
 	output float Dot = 1.0)
 {
 	NormalOut = normalize(Direction);
-	Dot = dot(NormalOut, NormalIn);
+	Dot = dot(NormalOut, normalize(NormalIn));
 }




More information about the Bf-blender-cvs mailing list