How do you get the origin of a Mesh in the shader?
The origin of a mesh is (0,0,0) in object space. To calculate this in world space we could use a matrix multiplciation, like float3 originWS = mul(UNITY_MATRIX_M, float4(0,0,0,1)).xyz, however a cheaper method is to extract the translation data from the matrix : UNITY_MATRIX_M._m03_m13_m23 (or unity_ObjectToWorld._m03_m13_m23) This is equivalent to the Position output of the Object node in Shader Graph.