Search Unity

Use RenderTexture as 'clip texture' on the ParticleEngine ShapeModule

Discussion in 'General Graphics' started by jeroenvdv, Nov 29, 2018.

  1. jeroenvdv

    jeroenvdv

    Joined:
    Oct 25, 2010
    Posts:
    52
    I would like to use a RenderTexture as the 'clip texture' in the ShapeModule of a ParticleEngine.

    I'm only able (via script) to assign a Texture2D as far as I found out.

    The reason would be to be able to use another cameras render result (from another scene) as realtime clip texture to create a particle look from that.

    Any suggestions? Thanks in advance!
     
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    RenderTextures generally store their data on the GPU, and the Particle System simulation happens on the CPU. It would be very slow to copy the data back from the GPU to the CPU in realtime for use by a Particle System, so we do not support it.

    The upcoming Visual Effect Graph simulates particles on the GPU, and is perfect for your use-case. It is available as a preview package in the 2018.3 beta right now.
     
  3. jeroenvdv

    jeroenvdv

    Joined:
    Oct 25, 2010
    Posts:
    52
    Thanks for your clear explanation, Richard.

    I'll dive into the Visual Effect Graph (already had a quick look last week). Our challenge is that we have to create an "universal particle system" in Visual Effect Graph to be able to do everything from code we can currently do with Shuriken from code (and more)...