I am currently working on a water shader that has animated waves (based on a sin wave) made through the shader itself, but in order to get the motion to look fluid enough, The mesh that will be used as the water will need to have quite a bit of polygons so as not to look too rigid. Is there a way to subdivide the mesh through the shader and apply the sin wave to those subdivisions?
Yes, that's what the tessellation stage is meant for. https://docs.unity3d.com/Manual/SL-SurfaceShaderTessellation.html http://catlikecoding.com/unity/tutorials/advanced-rendering/tessellation/
But how do I get that working? I copied all the code but the material would remain pink... And the hlsl file's icon is a simple texticon and not one of the shaders. So, if you don't mind I would love to get the code from you and a more decent explanation cause it just won't work if even after trying for days. And like what type of shader does it need to be?