Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice

[SOLVED] Shader warnings due to the use of UNITY_MATRIX_MVP

Discussion in '5.6 Beta' started by Kronnect, Mar 16, 2017.

  1. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,902
    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:

    Code (CSharp):
    1. #if UNITY_VERSION >= 540
    2.   o.pos = UnityObjectToClipPos(v.vertex);
    3. #else
    4. o.pos = mul(UNITY_MATRIX_MVP, v.vertex)
    5. #endif
    Thanks!
     
    Arkade likes this.
  2. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    655
    @Thrawn75, send like a good suggestion. If you get no response here, maybe worthy of a bug report?
     
    Kronnect likes this.
  3. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,902
    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
     
  4. zeroyao

    zeroyao

    Unity Technologies

    Joined:
    Mar 28, 2013
    Posts:
    169
  5. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,902
    Cool. Just missed it! Thanks, good direction!