Hi,
I am attempting to use the vertex data in a surface shader to get an angle. I have the camera centered at 0,0. In what coordinate system is v.vertex in the vertex function?
#pragma surface surf Lambert vertex:vert nolightmap
void vert (inout appdata_full v, out Input o)
{
o.svc =(1-(_vc*v.vertex.z)/sqrt(pow(v.vertex.x,2) + pow(v.vertex.y,2) + pow(v.vertex.z,2)))/sqrt( 1 - _vc * _vc);
}
I thought it would be the world coordinate system, but I get different results for objects that are rotated in unity when compared to objects that are rotated in 3DS Max ahead of time to look the same vertex wise. What data am I actually recieving with v.vertex.xyz?