Loading normal maps in TSL

Hi!
I was updating some details on my node materials and I stepped upon something weird.
I’m currently transferring material settings from a regular non-node material to a node material. For pretty much everything else it worked smoothly. But with normal maps something is weird.
In TSL I found the normalMap(<textureNode>, ?<scaleNode<vec2>>) function that takes a texture(<THREE.Texture>, ?<uvNode>) and I am using texture() on other parts and it works fine. normalMap() extends vec3 so technically it’s ready for normalNode that takes vec3 inputs alike. But when I use the following code. It just simply does nothing. Also I doubled checked the data passed in the nodes and everything seems perfectly fine.

newNodeMaterial.normalNode = normalMap(texture(material.normalMap, uv(material.normalMap.channel)), vec2(material.normalScale));

I can’t seem to be able to load normal map textures with node materials and TSL.

So has anyone successfully loaded normal map textures on a fresh node material ?

Inspired initially by this example: three.js examples
Inside they load a bump map with bumpMap() that seems very similar to normalMap(). Although after some digging, I found out by checking the source code that with bumpMap() you give a texture() but with normalMap() you need to give a vec3 already. So maybe it’s just a matter of converting texture data from texture() to vec3. I tried to called texture(...).rgb and vec3(texture(...)) with no success. It’s really confusing that normal maps can’t be loaded with their textures directly when other comparable material data can.

Can I easily convert texture() to a vec3, how ?

Well after double checking some source:

/*
* This class can be used for applying normals maps to materials.
 *
 * js
 * material.normalNode = normalMap( texture( normalTex ) );
 * 
 *
*/

So I ruled out the potential typing issue texture() is valid even if vec3 is suggested.

Never mind I’ve got confused. But it was working for some time already. My lighting setup was camouflaging it extremely well. The result of the node shaders is not exactly the same as with the original material due to some other little details so not seeing visible change got me confused.
:sweat_smile: