Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug "Undefined area shadow filter algorithm"

Discussion in '2023.1 Beta' started by DeadPoet, Dec 13, 2022.

  1. DeadPoet

    DeadPoet

    Joined:
    Jan 7, 2013
    Posts:
    34
    Hey everyone

    We are getting many red errors in our project and can't get a hold of them. They are all basically the same:

    Code (CSharp):
    1. Shader error in 'ONE OF MANY ASSET FOLDERS': "Undefined area shadow filter algorithm" at /XYZ/Library/PackageCache/com.unity.render-pipelines.high-definition@15.0.2/Runtime/Lighting/Shadow/HDShadowAlgorithms.hlsl(53)
    2.  
    3. Compiling Subshader: 0, Pass: Forward, Fragment program with DECALS_OFF SHADOW_LOW USE_FPTL_LIGHTLIST
    4. Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR 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: DEBUG_DISPLAY DECALS_3RT DECALS_4RT DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON INSTANCING_ON LIGHTMAP_ON LOD_FADE_CROSSFADE SHADER_API_GLES30 SHADOWS_SHADOWMASK SHADOW_HIGH SHADOW_MEDIUM UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA 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_RGBM_ENCODING 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 USE_CLUSTERED_LIGHTLIST _ALPHATEST_ON _BLENDMODE_ADD _BLENDMODE_ALPHA _BLENDMODE_PRE_MULTIPLY _DOUBLESIDED_ON _ENABLE_FOG_ON_TRANSPARENT _SURFACE_TYPE_TRANSPARENT
    We hope that anyone here has an idea on how to fix it. :(
    Have a great day!
     
  2. aaronlionheart

    aaronlionheart

    Joined:
    Jul 29, 2021
    Posts:
    1
    Same thing in 2022.2.0f1


    "Undefined area shadow filter algorithm" at /HR/heroesraid/Library/PackageCache/com.unity.render-pipelines.high-definition@14.0.4/Runtime/Lighting/Shadow/HDShadowAlgorithms.hlsl(53)

    :rolleyes:
     
  3. DeadPoet

    DeadPoet

    Joined:
    Jan 7, 2013
    Posts:
    34
    We had to add "#pragma multi_compile_fragment AREA_SHADOW_MEDIUM AREA_SHADOW_HIGH" to the 3rd party shaders that were throwing errors.
     
  4. at580933

    at580933

    Joined:
    Sep 25, 2021
    Posts:
    1
    I am using HDRP and R.A.M is not working and the water is pink and I get this error in shadergraph ( "Undefined area shadow filter algorithm" ).. ????
    Does anyone know how to fix it
     
  5. kmowers

    kmowers

    Joined:
    Dec 12, 2016
    Posts:
    15
    @DeadPoet 's answer helped me fix the R.A.M. water shaders. Look for the shader pass "Forward", add "#pragma multi_compile_fragment AREA_SHADOW_MEDIUM AREA_SHADOW_HIGH" next to all the other pragmas under that.


    Code (CSharp):
    1. Pass
    2.         {
    3.             Name "Forward"
    4.             Tags
    5.             {
    6.                 "LightMode" = "Forward"
    7.             }
    8.      
    9.             // Render State
    10.             Cull [_CullModeForward]
    11.         Blend [_SrcBlend] [_DstBlend], [_AlphaSrcBlend] [_AlphaDstBlend]
    12.         Blend 1 SrcAlpha OneMinusSrcAlpha
    13.         ZTest [_ZTestDepthEqualForOpaque]
    14.         ZWrite [_ZWrite]
    15.         ColorMask [_ColorMaskTransparentVelOne] 1
    16.         ColorMask [_ColorMaskTransparentVelTwo] 2
    17.         Stencil
    18.         {
    19.         WriteMask [_StencilWriteMask]
    20.         Ref [_StencilRef]
    21.         CompFront Always
    22.         PassFront Replace
    23.         CompBack Always
    24.         PassBack Replace
    25.         }
    26.  
    27.             HLSLPROGRAM
    28.      
    29.             // Pragmas
    30.             #pragma multi_compile _ DOTS_INSTANCING_ON
    31.         #pragma instancing_options renderinglayer
    32. #pragma multi_compile_fragment AREA_SHADOW_MEDIUM AREA_SHADOW_HIGH
     
  6. Infinite0007

    Infinite0007

    Joined:
    Nov 27, 2020
    Posts:
    1
    That worked very well! Thanks so much!