Search Unity

Question Max Capacity and Powers of Two

Discussion in 'Visual Effect Graph' started by Yggdrazyl, Oct 2, 2022.

  1. Yggdrazyl

    Yggdrazyl

    Joined:
    Jul 12, 2017
    Posts:
    16
    Possibly a pretty technical question. I was wondering if there was a benefit to setting the max capacity (memory allowed) of emitters / max capacity of strips / max number of particles per strip to a power of 2.

    The demos seems to imply it is good practice, but I can't find any clear mention of that anywhere.

    Thanks a lot for the help!
     
  2. fleity

    fleity

    Joined:
    Oct 13, 2015
    Posts:
    345
    I would expect that indeed since it's allocating a buffer on the gpu it would make sense that power of two is advisable but in fact I don't know for sure.
    Furthermore it would be interesting if multiple system's capacities inside the same effect asset are counted together for these buffers.
     
  3. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,307
    Can't find the source at the moment, but I think it does not matter, or at least it should not be main thing that dictates buffer size. Memory is not allocated as power of two anyway, so it would make more sense to be a multiple of 8 or something like that.

    Maybe it's more important with new batching system, but then we need devs to speak up.