Unit3d has a code snippet for the vertex shader:
v2f vert(appdata_full v) { v2f o; o.pos = mul (UNITY_MATRIX_MVP, v.vertex); o.uv = TRANSFORM_TEX(v.texcoord, _MainTex); o.vertexColor = v.color * _TintColor; return o; }
In the lines below:
o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
What is the main task of the TRANSFORM_TEX function and that it is equivalent in CgFx!
Saparkhid
source share