Shadows not working correctly on the mesh affected by the Vertex Shader. Light treats the mesh like it was never affected by the shader
How to get proper light and shadows on the mesh vertices affected by a Vertex Shader?
Hello!
I am trying to make the snow cover my plane. The shader I am using lifts the Y coordinates of the mesh vertices depending on the Simple Noise. Here is a picture to help explain: https://drive.google.com/file/d/1_PquChhuphlj5llzUNNY4uKG-zs_5RhY/view?usp=sharing
Also, I have nearly copied the example from this video (my copy is not identical, although in this video problem still exists). https://www.youtube.com/watch?v=ftCyZ7F5q9E
Here is my video to explain what is wrong: https://drive.google.com/file/d/1e-CrJ6vICbcGxW53ird91Czax8tmFKXw/view?usp=sharing
I made the snow 'offset' very large to make the problem more obvious. As you can see, there are no shadows on the mesh (can I call this a mesh?). The light covers the surface evenly although the surface is not flat.
The plane is actually flat yes!
Maybe this is because the Light is applied on the mesh before the Shader gets applied?
I have added some nodes to the shader to allow the shadows on the mesh. And shadows actually show correctly (for example the cube or sphere) but still neglect the changes in the mesh after the shader!
Also I think I will need the dynamic shadows because the shader will be changing dynamically (show footsteps).
Thank you!!!!