diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-08 17:23:13 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-05-08 17:23:13 +0400 |
commit | 3e763d7e4dbbc4acb3deb7afb95e936ce950ebb5 (patch) | |
tree | 9e14267999906ae1fd99e27b7b9b9b8ddf87552b /intern/cycles/kernel | |
parent | 28617bd7106b918bfd40305fdd709f3e73649d9c (diff) |
Fix #35246: cycles has no simple way to combine bump and normal mapping. Now
the Bump node has a Normal input, so you can chain it after a Normal Map node.
Note that normal mapping always has to be done first because it is tied to the
particular mesh surface and tangents.
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/shaders/node_bump.osl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/shaders/node_bump.osl b/intern/cycles/kernel/shaders/node_bump.osl index 24db1b24458..27770beb776 100644 --- a/intern/cycles/kernel/shaders/node_bump.osl +++ b/intern/cycles/kernel/shaders/node_bump.osl @@ -27,7 +27,7 @@ surface node_bump( float SampleCenter = 0.0, float SampleX = 0.0, float SampleY = 0.0, - output normal Normal = N) + output normal NormalOut = N) { /* get surface tangents from normal */ vector dPdx = Dx(P); @@ -44,6 +44,6 @@ surface node_bump( float absdet = fabs(det); /* compute and output perturbed normal */ - Normal = normalize(absdet * NormalIn - sign(det) * surfgrad); + NormalOut = normalize(absdet * NormalIn - sign(det) * surfgrad); } |