hello everyone,
Today when I read the source code of a shader in Glow effect by Unity (actually the GlowCompose.shader), I find there is a MultiplyUV() function (see following code segment), and this function’s existence confused me.
v2f vert (appdata_img v)
{
v2f o;
o.pos = mul (UNITY_MATRIX_MVP, v.vertex);
o.uv = MultiplyUV (UNITY_MATRIX_TEXTURE0, v.texcoord.xy);
return o;
}
I don’t know why a uv should multiple a matrix since in most of the case, I use uv directly. So, the question is, why the code above transform the uv, and what’s the matrix of UNITY_MATRIX_TEXTURE0 is (I know it’s glstate_matrix_texture[0] or say glstate_matrix_texture0, but don’t know what this matrix is)?