<div>Hi Brecht,</div><div><br></div><div>I was implementing a contour/bevel shader node, and i though it could convenient to have a input normal socket to connect the contour node there. Messing with the code i end up implementing per bsdf bump/normal mapping. here there are screenshots of the working patch: (the image nodes also have initial basic normal mapping support too)</div>
<div><br></div><div><a href="http://www.pasteall.org/pic/show.php?id=32464">http://www.pasteall.org/pic/show.php?id=32464</a><br></div><div><a href="http://www.pasteall.org/pic/show.php?id=32414">http://www.pasteall.org/pic/show.php?id=32414</a></div>
<div><a href="http://www.pasteall.org/pic/show.php?id=32412">http://www.pasteall.org/pic/show.php?id=32412</a></div><div><br></div><div>Also if you want to take a quick look at the implementation details i attach you the patch too ( Is not meant to be for review, i still need to clean it up and make some stuff there better)  :</div>
<div><div><br></div><div><a href="http://dl.dropbox.com/u/65979653/BlenderComunityShare/Patchs/Own/NormalOutput_PerBSDFNormal_0.7.diff">http://dl.dropbox.com/u/65979653/BlenderComunityShare/Patchs/Own/NormalOutput_PerBSDFNormal_0.7.diff</a>
</div><div><br></div></div><div><br></div><div>*) Whats left is to define if this is the right workflow. The initial idea is:</div><div><br></div><div>N0: Normal input subgraph in the output node will define the first shader normal (ShaderData::N)</div>
<div><br></div><div>N1: Displacement input in Output normal still makes bump mapping, it will make displacement and bump mapping as needed, the normal generated here is a modulation of the normal already defined in N0</div>
<div><br></div><div>- Bump Nodes in the user interface will compute the bump normal using the ShaderData::N as base normal already defined by N0 and N1, the bump normal output can be connected to normal input bsdf sockets, this normals will be writen to ClosureData::N and used latter on in the bxdf sampling functions. </div>
<div> </div><div>- For the user be able mix normals a new &quot;mix normals&quot; node could be added, is not clear if it should be a new node or upgrade the vector math node adding that option and a mix input socket.</div>
<div><br></div><div>- Image node:  still needs to let the user specify the normal space whether is world/object/tangent space. Also a control &quot;intensity&quot; could be added to attenuate the normal before output it in the normal out socket?</div>
<div><br></div><div>*) Internal implementation details:</div><div><br></div><div>Bump node no longer writes directly the ShaderData::N, instead they output the normal generated. To set the normal to ShaderData::N, there is a new small node &quot;SetNormal&quot; this will be only used once in the shader graph, and right now is used to set the normal defined by the subgraph in the input normal of the output node.</div>
<div><br></div><div>Obviously you have something to say here. I&#39;ll wait for your advice on this 
whether improve it or reimplement it in an other way.</div><div><br></div><div>Thank you for you attention.</div><div>Agus,</div><div><br></div>