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

Can't Build do to shader compile errors

Discussion in 'Editor & General Support' started by Drowning-Monkeys, Nov 2, 2017.

  1. Drowning-Monkeys

    Drowning-Monkeys

    Joined:
    Mar 6, 2013
    Posts:
    328
    So I've read some things that suggest this would've been fixed by now, I'm running 2017.1.2p2, and I get all kinds of shader compile bugs at build time and can't complete a build. The odd thing is sometimes I can complete a build but its totally random.

    Things like: "Shader compiler error - failed to read correct magic number"
    "internal error compiling shader snippet type=1 platform=1"

    etc etc etc


    any ideas on what I can do?
     
  2. Drowning-Monkeys

    Drowning-Monkeys

    Joined:
    Mar 6, 2013
    Posts:
    328
    other errors include:
    "Assertion failed: Shader Compiler Socket Exception: Terminating shader compiler process, 0 retries left"
    "Assertion failed: Shader compiler: internal error compiling shader snippet type=1 platform=1: Protocol error - failed to read correct magic number"
    "Shader error in 'Standard': Too many math instructions for SM2.0 (67 needed, max is 64). Try #pragma target 3.0 at /Unity 2017.2/Editor/Data/CGIncludes/UnityStandardCore.cginc(444) (on d3d9)
    Compiling Fragment program with DIRECTIONAL LIGHTMAP_ON FOG_LINEAR _ALPHATEST_ON _NORMALMAP
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP"
     
  3. Drowning-Monkeys

    Drowning-Monkeys

    Joined:
    Mar 6, 2013
    Posts:
    328
    removing dx9 from my build support solved this issue for me. I am curious however, if anyone has any feedback, as to why I could compile from time to time.