Search Unity

Simple shader showing in 2019 editor but not on device

Discussion in 'Shaders' started by Steffen-Franz, May 12, 2021.

  1. Steffen-Franz

    Steffen-Franz

    Joined:
    Aug 29, 2012
    Posts:
    1
    Trying to get my feet wet with shaders, so I created a small prefab that reflects a target in the ground that is using a shader to mimic occlusion.

    This seems to work quite nicely in 2019's editor, but when I run it as a build on different platforms (osx, win, android). they all don't seem to cull the geometry as it does in the editor.

    Here's the shader code:


    Shader "Custom/HoleShader" {
    SubShader
    {
    Lod 100

    Tags
    {
    "Queue" = "Geometry-1"
    "RenderType"="Opaque"
    }

    Pass
    {
    ZWrite On
    ZTest LEqual
    ColorMask 0
    Cull Back
    }
    }
    }



    Editor:

    Screen Shot 2021-05-11 at 12.07.30 PM.png

    Device:
    Screen Shot 2021-05-11 at 12.09.34 PM.png