Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How to sample a custom index with Set Position Sequential 3D?

Discussion in 'Visual Effect Graph' started by techtonicplates, Mar 27, 2023.

  1. techtonicplates

    techtonicplates

    Joined:
    Jan 1, 2018
    Posts:
    5
    So I'm using Set Position Sequential ThreeDimensional to set positions but the index doesn't match up with the sequential index of how the render texture is being read. So how do I then convert the index to correct uv coords to sample the texture instead? I thought it might work if I switch the x and y around but doesn't seem to do the trick. Thanks in advance!
     

    Attached Files:

  2. techtonicplates

    techtonicplates

    Joined:
    Jan 1, 2018
    Posts:
    5
    I figured out the UV values:

    U = id / height
    V = id / width * height