I am new to writing shaders in Unreal, and was following this tutorialby Temaran. I got it to successfully run on UE4.24.1 that I build from source, and my goal is to learn how to edit the custom shaders in this tutorial in order to make a water surface wave effect by moving the vertices of a plane StaticMeshComponent.
I was playing around with the Vertex Shader inside PixelShader.usf, but I realized that the actual vertices of the StaticMeshComponents in the scene do not get effected at all. It seems that only the vertices of the texture that is applied to the StaticMeshComponents are effected.
I was able to achieve a basic wave effect fairly easily with the Material Editor by affecting the World Position Offset, but am having a lot of trouble figuring out how to edit the code of Temaran’s tutorial to pass in the vertex positions into the Vertex Shader in order to achieve a similar effect.
What I’ve learned from my research so far is that a Vertex Factory can pass in vertex information into the Vertex Shader, but the documentation about how to implement a Vertex Factory seems to be very limited.
Does anyone have any leads about how to approach this? If someone knows where to find a tutorial (preferably for beginners) about how to do something like this, that would be really helpful!