Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question about updating UNITY_MATRIX_MVP

Discussion in 'Shaders' started by JackDDeane, Mar 9, 2020.

  1. JackDDeane

    JackDDeane

    Joined:
    Aug 6, 2018
    Posts:
    26
    Hi all,

    I'm following an old tutorial in which they use the following multiplication:

    mul(UNITY_MATRIX_MVP, v.vertex).xyz
    But I can't just stick UnityObjectToClipPos in there because it's not a variable but a function, so how would I properly update this code?
     
  2. JackDDeane

    JackDDeane

    Joined:
    Aug 6, 2018
    Posts:
    26
    So I figured it out, turns out I don't need the mul in there, you can just do UnityObjectToClipPos(v.vertex).xyz