How to add light to ShaderMaterial

Hi!
There are more questions, than answers.

Why do you negate lightDirection?

After that line you change position of a vertex, adding aPosition, but it doesn’t mean that vertex’s normal stays the same. Though, I don’t know how your object looks like and how aPosition changes object’s form.

Would be cool to provide an editable live code working example, that demonstrates the issue.

1 Like