Search Unity

Particle position and alpha

Discussion in 'General Graphics' started by Cactus_on_Fire, Aug 2, 2020.

  1. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    Hello.

    I noticed that the color and alpha or the particles are registered as integers, is there a way to make them register as a float value for the shaders to use?

    Also when I made a object position based shader, all the particle positions appear to be at the pivot of the particle system rather than at the center of the individual particles, is there a way to get their world position centers on the individual particle pivots?

    Thanks.
     
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    They are stored as 0-255 bytes and we don’t have plans to allow floats.

    You can pass a float color per particle by using the Custom Data module, as an alternative. (But then you need a custom shader to use the data)

    For particle positions, enable custom vertex streams in the renderer module and then you can add Center as a stream. All position data is in world space.
     
    BrandyStarbrite likes this.
  3. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    Awesome. Thank you.
     
    richardkettlewell likes this.