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 Understanding particle position inside Shader Graph

Discussion in 'Visual Effect Graph' started by Livealot, May 18, 2021.

  1. Livealot

    Livealot

    Joined:
    Sep 2, 2013
    Posts:
    228
    I'm confused in how to think about the position of a particle in a VFX graph relative to the various position nodes in a shader graph for that particle.

    Can anyone explain this better?

    For example, it seems that the common shader graph nodes are usually referring to the VFX system, rather than the specific particle/quad in that system.

    Here's the vfxgraph side
    SGpositionAttribute.JPG

    And here's the shader graph side, where PositionTest exposes a Vector3 parameter called ParticlePosition. There are a many "positions" to choose from, and all seem different than the one passed via the parameter.
    SGpositionNodes.JPG

    The scenario where my confusion is most exposed is where I have a shader graph that manipulates stuff based on the "Y" value of the RGB value, which goes wonky as the "Y" value of the Vector3 gets moved around.