Search Unity

Particle Vertex Streams real scale of a particle

Discussion in 'Shaders' started by DuvE, Dec 7, 2019.

  1. DuvE

    DuvE

    Joined:
    May 22, 2016
    Posts:
    168
    Hi, I want to use the vertex offset in particle shader. For example, I want to move particles 1 unit up, so when particle system is at a scale of 1, each particle moved 1 unit up normally, but if I scale the whole particle system to 0.25, particles still moved 1 unit up. The Size vertex stream sending just the size of particles, not its real scale in world space.

    So, my question is - how can I pass the world/lossy space scale of a particle(or world/lossy scale of a whole PS) in a material without using C#?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,342
    Unfortunately you can’t. The closest you can do is use instanced particles and extract the scale from the transform matrix.