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

GPU Particles - ComputeBuffer & ARGB32f alternatives

Discussion in 'Shaders' started by isharko, Jul 21, 2014.

  1. isharko

    isharko

    Joined:
    Jun 6, 2014
    Posts:
    4
    Hi,

    I've been trying to port my C++ openGL code that calculates position & velocities of millions of particles on the GPU via shader to Unity, but have ran into a problem that Unity doesn't support ARGB32f in Texture2D. From my research, everyone in the community has moved to ComputeShader & ComputeBuffer, but it's supported by DX11, and therefore unavailable to me, a Mac user.

    Does anyone have any alternatives or ideas on how to approach this problem?

    Thanks
     
  2. Aieth

    Aieth

    Joined:
    Apr 13, 2013
    Posts:
    805
    If you need CPU side floating point textures you only have three options in Unity.

    1. Structured Buffer (No go, you're on mac as you said)
    2. A native plugin that manages the texture
    3. Feeding the data CPU -> GPU via constant buffers. Only works one way though

    So if you need the data to go back to the CPU the only option is number 2, otherwise number 3 might work but if you have a lot of data it ends up as many passes.
     
  3. isharko

    isharko

    Joined:
    Jun 6, 2014
    Posts:
    4
    r618 likes this.