Hi all
I’ve got a question regarding a custom shader to display a color gradient based on the height of the vertex over a massive terrain. The problem is the following:
- Im trying to visualize a survey of channel in Unity, i’ve got the model all ready and in Unity but i want to visualize the high-low spots of the oceanfloor by using a gradient. Highest spots are red → Yellow → Green → Lowest spots Blue.
I created the following shader:
It should put a color gradient based of the height of the vertices of the model. The problem is that it will only do this based on the height of the camera in relation to the model. If i zoom in i can see the gradient. But as soon as i go up with the camera the entire model gets the same color. The position node is set to World so it shouldn’t be influenced by the cameras position right?
This is the first time for me to create a shader, as you can probably tell im very new to this.
It should look kinda like this (example of a different software)
I would very much appreciate it if someone could point in the correct way