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

Reading color buffer from previous frames

Discussion in 'General Graphics' started by maxestws, Jul 11, 2018.

  1. maxestws

    maxestws

    Joined:
    May 17, 2014
    Posts:
    24
    I have a need to sample the final output color buffer from the previous frame, or maybe even from two frames ago. Is there a way to access those buffers in OnRenderImage?

    I know that I can, by myself, simply copy the final output buffer in OnRenderImage to some temporary buffer and use it in following frames but that is a waste of GPU cycles for the blit, given that these previous frames' color buffers could already be stored somewhere. So can I somehow grab the previous frame's buffer?
     
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,983
    No. You should use blits.