I added a vertex shader to my simple surface shader:
#pragma surface surf Standard fullforwardshadows vertex:vert
sampler2D _HeightMap;
void vert(inout appdata_full v) {
fixed4 wsr = tex2D(_HeightMap, ???); // What to do here?
v.vertex.y += wsr.r + wsr.g + wsr.b;
}
I want to read a texture, and change the y coordinate depending its value. However I can’t find how to do it.
How can I do this?