Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

How to correctly render the motion velocity buffer with SRP?

Discussion in 'Graphics Experimental Previews' started by polar1225, Sep 27, 2018.

  1. polar1225

    polar1225

    Joined:
    May 19, 2017
    Posts:
    7
    Hi~
    I want to render the object motion velocity buffer in my SRP Pipeline.After reading the HD-Pipeline,I try to implement it with a similar approach
    Code (CSharp):
    1. RenderObjectsVelocity()
    set the camera depthTextureMode to
    Code (CSharp):
    1. DepthTextureMode.MotionVectors | DepthTextureMode.Depth
    set the RendererConfiguration to
    Code (CSharp):
    1. RendererConfiguration.PerObjectMotionVectors
    and render my "MotionVectors" shader pass,i got the buffer rendered successful.But after check the render loop of my pipeline,i found that all of my scene object with the shader which contains the "MotionVectors" is renderering even it is static,i debug the HD-Pipleline,only the moving object is renderer in the stage,what did i missing to get the non-moving object culled ? THX..
     
  2. polar1225

    polar1225

    Joined:
    May 19, 2017
    Posts:
    7
    Need Help~~ ops..
     
  3. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    936
  4. polar1225

    polar1225

    Joined:
    May 19, 2017
    Posts:
    7
    Em..It works,I really appreciate your replay :):)
     
  5. happyfirecn

    happyfirecn

    Joined:
    Dec 28, 2016
    Posts:
    11
    The document link is invalid now, could you please give a new link?
     
  6. tun1018

    tun1018

    Joined:
    Sep 18, 2019
    Posts:
    26
    hello, could i add an new pass after built-in "motion vector pass" ?