surface shader vertex function coordinates vs surface function coordinates

Hi,

the coordinates .xyz of vectors like the .Normal inside a vertex function are orientated like the local axis in Unity, ie. .y is the normal of a plane, or better .vertex.y is outside a plane, a plane is always along .vertex.x and .vertex.z.

Inside the surface function however, the texture "plane"s uv correspond to xy, the surface functions “z” is the vertex functions “y”.

Is this correct? Can I look up such definitions somewhere?

Thanks! Have fun!

Another coordinate question:

the vertex functions .vertex coordinates in a surface shader of planes created in unity consider the scale, ie. if the plane is scaled 10 in x, the .vertex.x coordinates stretch from 0 to 100 (because a Unity plane is 10 by 10 to begin with).

the same coordinates of a sphere created in Unity do not consider the scale however: .vertex.x of a sphere initially stretches from -1 to 1 no matter the scale!

What’s the reason or am I missing something?

You are missing something… You forgot not to use surface shaders :wink: