Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Render pipeline memory allocation and caching

Discussion in 'Graphics Experimental Previews' started by adbourdages, Nov 28, 2018.

  1. adbourdages

    adbourdages

    Joined:
    Jul 8, 2012
    Posts:
    75
    I've been testing a super simple 2D render pipeline and in itself it saves about 5% processing time over the standard camera processing. However, I've recently noticed that every call to CullResults.Cull allocates 96B of memory, which is not great (this is with v3.0.0). Then creating the clear depth command buffer adds another 48B.

    It would be nice to be able to:
    - do custom culling or cache culling results (It is a 2d game with a very structured object setup so we already know which object are on screen and it doesn't change very often) ...
    - cache CommandBuffers (like the clear depth buffer, it never changes between frames)

    Cheers,
    Alain-Daniel
     
  2. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,221
    In the latest versions we do no allocate anything on the cull call :) It can still be a good idea to cache non changing command buffers.