Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Build error: "Shader compiler: internal error compiling shader snippet type=0 platform=5"

Discussion in 'Unity Build Automation' started by tatata, May 17, 2016.

  1. Gamezaur

    Gamezaur

    Joined:
    Oct 12, 2016
    Posts:
    22
    I found out something interesting about this issue. My teammate was able to build the same project project using the same Unity version as mine. No shader errors, no pink screens etc. So there must be something on my machine that's corrupting the build process. Unfortunately, clearing the library folder did not help.

    Also, another thing. I used to get this error in Unity right after starting the build process. Now, the build in Unity goes ok, but the application crashes in XCode indicating problems with several shaders. Clearing the library might be what caused this change but I'm not sure. Every once in a while I get this in Unity, too.

    And finally, this is happening for many of my projects, not just one. So this is definitely some global problem of Unity.
     
    avorobjev likes this.
  2. xysverma

    xysverma

    Joined:
    May 8, 2013
    Posts:
    10
    Unable to build anything in unity 2019.2.9f1. Even simplest project build fails for Android atleast with shader error.

    Shader compiler: Compile Standard - FORWARD, Vertex Program: Internal error, unrecognized message from the shader compiler process. Please report a bug including this shader and the editor log.


    Shader error in 'Standard': Internal error, unrecognized message from the shader compiler process. Please report a bug including this shader and the editor log.

    Shader compiler: Compile Legacy Shaders/Diffuse - FORWARD, Fragment Program: Internal error, unrecognized message from the shader compiler process. Please report a bug including this shader and the editor log.

    Shader error in 'Legacy Shaders/Diffuse': Internal error, unrecognized message from the shader compiler process. Please report a bug including this shader and the editor log.

    Shader compiler: Compile Hidden/Internal-ODSWorldTexture - Pass 0, Vertex Program: Internal error, unrecognized message from the shader compiler process. Please report a bug including this shader and the editor log.

    Shader error in 'Hidden/Internal-ODSWorldTexture': Internal error, unrecognized message from the shader compiler process. Please report a bug including this shader and the editor log.

    Shader compiler: Compile Hidden/VideoDecode - Flip_NV12_To_RGBA, Vertex Program: Internal error, unrecognized message from the shader compiler process. Please report a bug including this shader and the editor log.

    Shader error in 'Hidden/VideoDecode': Internal error, unrecognized message from the shader compiler process. Please report a bug including this shader and the editor log.

    Error building Player: 4 errors

    Build completed with a result of 'Failed'
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

    UnityEditor.BuildPlayerWindow+BuildMethodException: 5 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:190
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:95
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at /Users/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

     
    avorobjev and ChrisVonMax like this.
  3. avorobjev

    avorobjev

    Joined:
    Apr 3, 2014
    Posts:
    8
    Does the MacOS version of your teammate same with yours? I suspect that this error appeared after I upgraded to Catalina. 2018 Unity for example stopped building Android, it crashes on clang++
     
  4. onesoftgames

    onesoftgames

    Joined:
    Dec 27, 2016
    Posts:
    6
    Same here, I believe this because of macOS Catalina too
    In Unity Editor the shader import error so when we run project in XCode, error bellow:

    2019-10-17 11:37:43.905591+0700 gametest[1939:749705] Built from '2019.2/staging' branch, Version '2019.2.8f1 (ff5b465c8d13)', Build type 'Release', Scripting Backend 'il2cpp'


    2019-10-17 11:37:43.910699+0700 gametest[1939:749705] -> registered mono modules 0x1053d3c60

    -> applicationDidFinishLaunching()

    2019-10-17 11:37:43.979516+0700 gametest[1939:749705] Metal GPU Frame Capture Enabled

    -> applicationDidBecomeActive()

    GfxDevice: creating device client; threaded=1

    Initializing Metal device caps: Apple A13 GPU

    Initialize engine version: 2019.2.8f1 (ff5b465c8d13)

    Failed to find expected binary shader data in 'TextMeshPro/Mobile/Distance Field'.



    (Filename: ./Runtime/Shaders/SerializedShader.cpp Line: 595)


    UnloadTime: 0.025042 ms

    WARNING: Shader Unsupported: 'Hidden/BlitCopy' - Pass '' has no vertex shader

    WARNING: Shader Unsupported: 'Hidden/BlitCopy' - Setting to default shader.

    2019-10-17 11:37:44.940472+0700 gametest[1939:749945] Compiler failed to build request

    Metal: Error creating pipeline state (Skybox/Procedural): output of type half4 is not compatible with a MTLPixelFormatInvalid color attachement.

    (null)Setting up 1 worker threads for Enlighten.

    Thread -> id: 16d14b000 -> priority: 1

    Metal: Error creating pipeline state (Skybox/Procedural): output of type half4 is not compatible with a MTLPixelFormatInvalid color attachement.

    (null)2019-10-17 11:37:44.973404+0700 gametest[1939:749945] Compiler failed to build request

    Metal: Error creating pipeline state (TextMeshPro/Distance Field): output of type half4 is not compatible with a MTLPixelFormatInvalid color attachement.

    (null)2019-10-17 11:37:44.990805+0700 gametest[1939:749705] Unbalanced calls to begin/end appearance transitions for <SplashScreenController: 0x108923600>.

    2019-10-17 11:41:45.511977+0700 gametest[1939:749913] [] tcp_input [C1.1:3] flags=[R] seq=2465819143, ack=0, win=0 state=LAST_ACK rcv_nxt=2465819143, snd_una=3371506048
     
  5. Gamezaur

    Gamezaur

    Joined:
    Oct 12, 2016
    Posts:
    22
    Nope. I upgraded to Catalina and my friend is on Mojave.
     
  6. Gamezaur

    Gamezaur

    Joined:
    Oct 12, 2016
    Posts:
    22
    I wonder, is Unity team working on this at all? Anyone submitted a bug report?
     
  7. Marek_Bakalarczuk

    Marek_Bakalarczuk

    Joined:
    Dec 28, 2012
    Posts:
    112
    Try to change graphic API only to Metal
     
  8. onesoftgames

    onesoftgames

    Joined:
    Dec 27, 2016
    Posts:
    6
    Could you please capture the screenshot where to change? Thank you!
     
  9. Gamezaur

    Gamezaur

    Joined:
    Oct 12, 2016
    Posts:
    22
  10. avorobjev

    avorobjev

    Joined:
    Apr 3, 2014
    Posts:
    8
    Last edited: Oct 18, 2019
  11. DrunkenMastah

    DrunkenMastah

    Joined:
    Sep 26, 2017
    Posts:
    51
    Yes I got fooled as well. After I did a clean build the error stop showing but now all my textures are Magenta instead.
    The solution i tried did not work and is still not fixed by Unity.
    All builds after Unity 2019.2.5f1 for iOS show magenta for every gameobject Regardless of shader from what i have seen.
    I am now trying to "keep all" shader variants.
    upload_2019-10-20_17-13-9.png

    I will report with my results if it is successful.
     
  12. Marek_Bakalarczuk

    Marek_Bakalarczuk

    Joined:
    Dec 28, 2012
    Posts:
    112
    Menu Edit>Project Settings then click on Player and uncheck Automatic graphic API, then on list remove OpenGLES (any version or all versions) and leave Metal ora, if it is not present, choose from dropdown
     

    Attached Files:

  13. LaureneTvl

    LaureneTvl

    Joined:
    Oct 25, 2019
    Posts:
    2
    Hey, I had the same issue on a project and this worked for me, so thanks a lot !
     
  14. Gamezaur

    Gamezaur

    Joined:
    Oct 12, 2016
    Posts:
    22
  15. Rock-Soft

    Rock-Soft

    Joined:
    Nov 3, 2012
    Posts:
    7
    It's funny someone in another forum said to remove Metal and keep the other but your tip is actually the one that worked. Removing metal basically made everything look and behave crazy in my iPhone build.

    Anyway, thanks for the tip. Was stuck on this for hours!
     
    Marek_Bakalarczuk likes this.
  16. Marek_Bakalarczuk

    Marek_Bakalarczuk

    Joined:
    Dec 28, 2012
    Posts:
    112
    I'm glad it helped.
     
  17. Marek_Bakalarczuk

    Marek_Bakalarczuk

    Joined:
    Dec 28, 2012
    Posts:
    112
    So try in other way: remove Metal and leave OpenGLES. Just play with those settings.
     
  18. jerryhamk

    jerryhamk

    Joined:
    Jun 4, 2019
    Posts:
    5
  19. zhn17

    zhn17

    Joined:
    Jul 30, 2019
    Posts:
    52
    In 2019 // 2020 betas there's also a issue (at least for me) where the "Standard Surface" Particle Shader never compiles fully and instead throws a internal error.
     
  20. Riott

    Riott

    Joined:
    May 18, 2019
    Posts:
    2
    Viktoria HwangSeptember 09, 2019 19:29


    Whoever makes it to here:
    Add the shaders your prefabs are using to that Always Include Shaders list in Project Settings --> Graphics. Rebuild your bundle assets and it should work.
    (Used in 2018.3.12f1)