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. Dismiss Notice

Question 'metaInput' missing semantics

Discussion in 'Universal Render Pipeline' started by Brady, Dec 9, 2021.

  1. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,469
    After upgrading from 7.7.1 to 12.1.2, some of my custom shaders have the following error:

    'UniversalFragmentMeta': input parameter 'metaInput' missing semantics (UniversalMetaPass.hlsls:37)

    "metaInput" is of type MetaInput, and going into MetaInput.hlsl reveals it is an alias for UnityMetaInput, which itself is a struct with no semantics. But these are all directly from URP 12.1.2's own original files with no modifications. What could be wrong?
     
    ununion and nasos_333 like this.
  2. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    12,904
    I have the same issue, shaders that worked fine in Unity 2019 are now broken in Unity 2021

    Any idea why this many happen ? The meta pass is very simple
     
  3. wechat_os_Qy01_D5oT6WWTPDtOYBTDi1n8

    wechat_os_Qy01_D5oT6WWTPDtOYBTDi1n8

    Joined:
    Nov 19, 2019
    Posts:
    3
    I think this is a bug of unity engine, but i don't know how to fixed it.
     
  4. bluelife88

    bluelife88

    Joined:
    Aug 9, 2018
    Posts:
    1
    if u use urp version 12 or later,in shader file change this:
    Code (CSharp):
    1. #pragma vertex UniversalVertexMeta
    2. #pragma fragment UniversalFragmentMetaLit
    eg:not use
    UniversalFragmentMeta
    but use
    UniversalFragmentMetaLit
    error will disappear.
     
  5. wechat_os_Qy01_D5oT6WWTPDtOYBTDi1n8

    wechat_os_Qy01_D5oT6WWTPDtOYBTDi1n8

    Joined:
    Nov 19, 2019
    Posts:
    3
    I think we should see the struct metaInput, if there is a variable in it we are using it.
     
  6. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,469
    I had to put this all on hold for a long time, but now that I've come back to it, this solution worked. Thanks!
     
  7. FardinHaque

    FardinHaque

    Joined:
    Apr 13, 2015
    Posts:
    7
    Thank you so much!
     
  8. nimeMotion

    nimeMotion

    Joined:
    Aug 3, 2019
    Posts:
    3

    Thanks for that!!!!!!!!!! i just love you
     
  9. nunomendes86

    nunomendes86

    Joined:
    Feb 23, 2021
    Posts:
    1
    thanks. worked here