Search Unity

Can I access vertex id in Shader Graph?

Discussion in 'Universal Render Pipeline' started by MasoInar, Sep 24, 2019.

  1. MasoInar

    MasoInar

    Joined:
    Feb 20, 2014
    Posts:
    126
    Hi,

    Is there anyway to access vertex id (UNITY_VERTEX_INPUT_INSTANCE_ID) in shader graph? I'm currently using vertex ids for baked animations and have working shader (hand-written HLSLProgram), but I would really like to use shader graph to create and modify those shaders.

    I'm using latest beta and Universal RP 7.1.1
     
  2. kalagaan

    kalagaan

    Joined:
    May 27, 2012
    Posts:
    1,502
    You could bake the vertex ID into the UV2 of your mesh, with a C# script. ;)
     
    Krajca, chantey and Dinamytes like this.