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

_CameraDepthNormalsTexture how to get normal depth with vertex animation ?

Discussion in 'Shaders' started by dreamerflyer, Mar 7, 2020.

  1. dreamerflyer

    dreamerflyer

    Joined:
    Jun 11, 2011
    Posts:
    927
    I found _CameraDepthNormalsTexture not update the data with vertex animaiton,not moving,Any solution for
    get vertex animation update in _CameraDepthNormalsTexture?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    You need to update the Internal-DepthNormalsTexture.shader to include a custom pass that does the same vertex animation, and have that pass and your shader use the same RenderType tag.
     
  3. dreamerflyer

    dreamerflyer

    Joined:
    Jun 11, 2011
    Posts:
    927
    It sounds that:if using render texture ,replaceshader and the object shader have the same Rendertype tag,but have different vertex animation with the object shader,in this case, Can not capture the vertex animation with render texture?Because replace shader vertex can not do muliti defferent animation.
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    Yes.

    The replacement shader is only doing the vertex animation that it has, because it is a different shader than the one you’re rendering to screen.
     
    dreamerflyer likes this.