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

Mac build gets different _CameraDepthTexture

Discussion in 'General Graphics' started by GeekJam, Mar 16, 2018.

  1. GeekJam

    GeekJam

    Joined:
    Sep 11, 2017
    Posts:
    4
    Using Unity version 5.6.5p1

    In the editor on my Mac (early 2012) the shader used that draws water has _CameraDepthTexture set to Deferred Depth

    However, in a OSX Universal Build, the same shader will have _CameraDepthTexture set to the same as the render target, which happens to be TempBuffer7

    I believe this is causing an issue I'm seeing with the shader in the build, and not in the editor.

    Any reason why _CameraDepthTexture will be different between editor and build? Is there a way to ensure that Deferred Depth is referenced in a build?

    Thank you! ShaderInBuild.png ShaderInEditor.png
     
  2. GeekJam

    GeekJam

    Joined:
    Sep 11, 2017
    Posts:
    4
    Resolved! Disabled Auto Generate Graphics API for Mac in Player Settings, and removed Metal so builds are made with OpenGL Core.