[SOLVED] Shader warnings due to the use of UNITY_MATRIX_MVP

Hi guys,

Could you please add a #pragma directive or custom shader define to avoid the Editor show warnings due to the use of UNITY_MATRIX_MVP?
I think a conditional still dumps the console warning:

#if UNITY_VERSION >= 540
  o.pos = UnityObjectToClipPos(v.vertex);
#else
o.pos = mul(UNITY_MATRIX_MVP, v.vertex)
#endif

Thanks!

1 Like

@Kronnect , send like a good suggestion. If you get no response here, maybe worthy of a bug report?

1 Like

Done.

Iā€™m afraid lot of projects will be flooded with these kind of warnings even if the conditional is there. Hope the bug report helps push through this suggestion.

Cheers

Look at one of the pinned threads right at the top: Regarding UNITY_MATRIX_MVP and UnityObjectToClipPos... - Unity Engine - Unity Discussions

1 Like

Cool. Just missed it! Thanks, good direction!