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: https://jsfiddle.net/j27oeu8e/1/
And this is with lights = false https://jsfiddle.net/j27oeu8e/2/
(I replaced the ambientLightColor with (1, 1, 1) so it would not break from unincluded THREE.UniformLib)
What am I doing wrong?