UNITY_MATRIX_MVP =? UNITY_MATRIX_M * UNITY_MATRIX_V * UNITY_MATRIX_P

Shader "Cg basic shader"
{
   SubShader
   {
      Pass
      {
         CGPROGRAM 

         #pragma vertex vert 
         #pragma fragment frag

         float4 vert(float4 vertexPos : POSITION) : SV_POSITION 
         {
           
            //float4x4 myMatrix = UNITY_MATRIX_P * UNITY_MATRIX_V *  unity_ObjectToWorld;
            //float4x4 myMatrix = unity_ObjectToWorld * UNITY_MATRIX_V * UNITY_MATRIX_P;
            float4x4 myMatrix = UNITY_MATRIX_MVP;
            return mul(myMatrix, vertexPos);
         }

         float4 frag(void) : COLOR
         {
            return float4(1.0, 0.0, 0.0, 1.0);
         }

         ENDCG
      }
   }
}

Replacing line 18 with line 17 does not produce the same result. What am I misunderstanding?

Bah…
Multiplying matrices with * is not the same as using mul()
:sweat_smile:

return vertexPos*myMatrix; ??
is not work for me!!

return vertexPos*myMatrix; ??
is not work for me!!

I mean … you just quoted the answer to your question. Don’t use *, use mul().