After I asked my previous question I started to figure out how a perlin function worked and was able to implement this into a shader, however I now have a problem, because my script that should display the same height as the terrain seems… shifted. So I converted my function from the shader to c# again, but despite having precisely the same function it’s still wrong. I also checked if the vertex changed by the unity_ObjectToWorld matrix and transform.position are both world coordinates and they seem to be the same.
Can anyone of you help me?
If you need to see the shader and the c# script you can find them on this github repository:
If you want to test the shader you first do need either just a plane (for a 10 x 10 resolution) or a 3d model plane width any other resolution (and make sure every face is 1 x 1 in unity units)
If if you’ve done so then you can move the plane around and view the terrain