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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

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:
    4
    StickyJordi likes this.