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

HDR particles in Shuriken

Discussion in 'General Graphics' started by dedemonn, Jun 6, 2021.

  1. dedemonn

    dedemonn

    Joined:
    Oct 6, 2020
    Posts:
    5
    Hello!

    I know HDR color is not supported in Shuriken system out of the box. For that reason I switched to VFX Graph and after created some effects, I learned that VFX Graph is not yet supported on mobiles.. :(

    I tried creating custom shader in PBR graph for such particles in Shuriken - yes, they were bright, but also the background was emitting colors.

    Is it in any way possible to achieve HDR particles in Shuriken? Anyone willing to share the solution?
     
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,281
    The only true way is to set the colors in the custom data module, which does support HDR. Then send the data to a shader by enabling the custom data vertex stream in the Renderer module. Finally, write a custom shader to read those colors.

    A cheaper workaround is to have a color multiplier in your shader that multiples your LDR colors up, but this is a more limited solution.
     
    Salepate likes this.
  3. dedemonn

    dedemonn

    Joined:
    Oct 6, 2020
    Posts:
    5
    I gave shader a try and it seems results are quite satisfying - is that what you meant with 2nd option?

    HdrParticleShader.png

    As for the 1st option - I don't have best knowledge on custom data and vertex streams yet, but would that solution be more flexible e.g. in terms of controlling Color over Lifetime?
     
    Last edited: Jun 6, 2021
  4. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,281
    Yes, a HDR emission color can work. Or a float brightness that you multiply with the albedo.rgb. Depends what result you want.

    Custom data does support making a gradient over lifetime, just like the color over lifetime module.

    Example here: https://docs.unity3d.com/Manual/PartSysVertexStreams.html
     
    dedemonn likes this.