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. Dismiss Notice

Mac builds not able to compile URP Decal feature

Discussion in 'Universal Render Pipeline' started by doublegumbo, Nov 15, 2021.

  1. doublegumbo

    doublegumbo

    Joined:
    Oct 24, 2013
    Posts:
    53
    When I make a Mac build, it throws these errors in the console, pointing specifically to the URP Decal shader (ShaderPassDecal.hlsl) that's currently featured in the 12.1 update.
    upload_2021-11-15_0-30-52.png

    Does anyone know a fix or workaround?

    Thanks!
     
  2. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    765
    I am getting the exact same errors. Here is more details:


    Code (CSharp):
    1. Shader error in 'Shader Graphs/Decal': Unmatched ')' at Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPassDecal.hlsl(98) (on metal)
    2.  
    3. Compiling Vertex program with _ADDITIONAL_LIGHTS _ADDITIONAL_LIGHT_SHADOWS _DECAL_NORMAL_BLEND_LOW _MAIN_LIGHT_SHADOWS
    4. Platform defines: SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_RGBM_ENCODING UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
    5. Disabled keywords: DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON FOG_EXP FOG_EXP2 FOG_LINEAR INSTANCING_ON LIGHTMAP_ON LIGHTMAP_SHADOW_MIXING SHADER_API_GLES30 SHADOWS_SHADOWMASK UNITY_ASTC_NORMALMAP_ENCODING UNITY_ENABLE_NATIVE_SHADOW_LOOKUPS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_FULL_HDR UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING _ADDITIONAL_LIGHTS_VERTEX _CLUSTERED_RENDERING _DECAL_NORMAL_BLEND_HIGH _DECAL_NORMAL_BLEND_MEDIUM _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN _SHADOWS_SOFT
    6.  
     
  3. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    765
    Looks like ShaderPassDecal.hlsl is bugged, it has this line:

    Code (CSharp):
    1.     #if defined(VARYINGS_NEED_STATIC_LIGHTMAP_UV && LIGHTMAP_ON)
    2.  
    It think it should be:
    Code (CSharp):
    1.     #if defined(VARYINGS_NEED_STATIC_LIGHTMAP_UV) && defined(LIGHTMAP_ON)
    2.  
    this bug is triggered if DEBUG_DISPLAY is defined,
     
  4. peterbay

    peterbay

    Unity Technologies

    Joined:
    Nov 2, 2017
    Posts:
    100
    Yeah, this definitely does not look right. I see that a bug has been reported for this, although it hasn't made its way through the system yet, so I don't have a link for it.
     
    goldbug likes this.
  5. doublegumbo

    doublegumbo

    Joined:
    Oct 24, 2013
    Posts:
    53