Search Unity

Question Pass custom data from vertex shader to fragment shader

Discussion in 'Shader Graph' started by StickyJordi, Dec 23, 2020.

  1. StickyJordi

    StickyJordi

    Joined:
    Aug 28, 2020
    Posts:
    3
    I've been looking around the web and the docs to find a way to pass custom data from the vertex shader to the fragment shader in shadergraph (as shown in the attachment), but so far I have been unsuccesful. I could easily use the available extra uv-channels, but they are not exposed.

    Does anyone know of a way to achieve this?

    I would for example like to do some calculations on the vertex-positions in the vertex shader and know which vertices were affected within the fragment shader.

    Thanks for your help in advance!
     

    Attached Files:

  2. rootools

    rootools

    Joined:
    Nov 25, 2013
    Posts:
    20
    Welcome to club! ^_^
     
  3. mddsvr

    mddsvr

    Joined:
    Aug 3, 2020
    Posts:
    6
    Ben_at_Work, ma77os and StickyJordi like this.