Search Unity

Particle Renderer Custom Vertex Streams

Discussion in 'Shaders' started by derekmorris_wf, Jul 17, 2017.

  1. derekmorris_wf

    derekmorris_wf

    Joined:
    Nov 22, 2016
    Posts:
    3
    Are there any limits to the number of uv sets that can be passed through in the Custom Vertex Streams of a particle renderer?

    The first two seem fine but the third is garbage. The vertex streams match the shader input and I've triple checked the packing of data into the TEXCOORD's. Also there's no error message that the stream doesn't match the shader input, so I presume that's ok.

    I'm on Unity 5.6.1f1. (Windows 64bit).
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    They support up to 4 TEXCOORD#s (0 through 3). If you're getting junk data and you're reasonably sure everything is correct elsewhere, you can try posting an example scene here so we can double check, or report it as a bug via the issue tracker.

    Just a screenshot of the inspector with the particle's custom data and renderer tabs expanded, and the shader you're using would be enough if you don't want to post a whole project.
     
  3. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    978
    For 2018.2:
    They added support for eight UVs
    "This allows you to use more custom data than ever before"

    Yet the custom data module in the Particle System doesn't seem to support adding custom data for 8x4 data = 32 custom data or 30 if you count out the original UV.
    However, here it's only 8. Am I misunderstanding something?

    upload_2018-7-25_15-7-44.png
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,348
    There's a lot more data than just what you can define in the custom data vectors. You can pass information about size, rotation, flip book UVs or frame, a multitude of random values (literally), etc. via the custom vertex streams. I'm guessing when they wrote "custom data" they were referring to those rather than explicitly the vectors in the Custom Data tab.
     
    FeastSC2 likes this.