Search Unity

Question 2D Renderer Unlit can't connect to Vertex Position

Discussion in 'Shader Graph' started by JmprDev, Dec 26, 2019.

  1. JmprDev

    JmprDev

    Joined:
    Apr 26, 2018
    Posts:
    16
    Greetings. I don't know if this is a bug but I can't connect to the vertex position input when the vector comes from a sampled texture otherwise it works just fine.

    upload_2019-12-26_9-44-38.png
     

    Attached Files:

  2. alexandral_unity

    alexandral_unity

    Unity Technologies

    Joined:
    Jun 18, 2018
    Posts:
    163
    You need to use a Sample Texture 2D LOD node for the vertex position slot, as the regular Sample node uses calculations that cannot be performed in the vertex function. This should be mentioned in the documentation pages for those nodes. c:
     
    fffMalzbier likes this.