ShaderMaterial + Lights


Trying to make my Shader Material to be affected by lighting but so far I have no luck.
I’ve decided to begin with Ambient light because it seem to be the simplest one.
But as soon as I enable lights I do not see any texture at all even if I don’t apply the ambientLightColor variable in my shader…

Here is my code:
And this is with lights = false
(I replaced the ambientLightColor with (1, 1, 1) so it would not break from unincluded THREE.UniformLib)

What am I doing wrong?

In case if anyone happen to have this issue in future…
It turns out that if you use THREE.UniformsUtils.merge to add UniformsLib for lights, texture (type: “t”) values become undefined.
I used uniforms.texture.value = my_texture after merging and the picture went right to my shader.