Search Unity

How to make a grabpass only grab 1 frame instead of continuous frames?

Discussion in 'Shaders' started by AdamAdams, Mar 23, 2018.

  1. AdamAdams

    AdamAdams

    Joined:
    Feb 10, 2018
    Posts:
    3
    Trying to make a sort of time-stop effect using a shader.

    Currently the grabpass will keep taking frames. I want it to only take the first frame it sees and then keep sending that one frame. Or send that first frame to a different shader if it has to / if it can; anything to grab the first frame of the grabpass so that I can then use that for whatever other shader/effect I want to apply afterward.

    I've searched everywhere for this for the past week or so but the closest I get is a camera that renders to a flat plane, which is no good.

    Again, ANY way to make it only grab 1 frame, or have it stop grabbing frames after a period, or make it reuse a certain frame repeatedly, or a way to save a frame as a texture and reuse that over and over, etc.
     
  2. brownboot67

    brownboot67

    Joined:
    Jan 5, 2013
    Posts:
    375
    You don't want a grab pass then. Have your camera render to a texture and pass that to your material.
     
  3. AdamAdams

    AdamAdams

    Joined:
    Feb 10, 2018
    Posts:
    3
    So is there is no way to access any one of the frames from the grabpass repeatedly or at a later moment?
     
  4. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    704