I want to deform mesh (preferably by vertex.glsl)
but i also want to use MeshReflectorMaterial
is there’s a simple solution
Copy the code from MeshReflectorMaterial and the files that it imports into your project and modify it to use your vertex shader - this is where you’ll be able to do that.
However just moving around the vertices in the vertex shader is not enough to get a good result. The reflection’s quality can be affected by normal calculations. So if you’re displacing your vertices enough, you’ll need to recalculate your normals in the vertex shader so that they are correct.
1 Like