Do this: get the normal direction node and then connect it to 3 component mask nodes, masking one channel for each (R,G,B) Then create a oneminus node and plug the normal node into it and again, create another 3 component mask nodes as above. You now have six mask channels for each normal direction. Add six color nodes,…