I'm writing a cel shader and the shadow acne issue occurred. The problem is that both the normal and depth bias make no difference at all on the shadow, while they do reduced the acne on other objects. I once copied & pasted someone else's cel shader into the project for testing purposes and the acne appears as well. So probably it is a project/pipeline setting issue instead of a shader issue, but I'm not sure. I'm using urp and Unity 2020.3.23. Code attached below. Code (CSharp): Shader "CustomShaders/CelShader" { Properties { _SurfaceColor ("Surface Color", Color) = (1, 1, 1, 1) _Smoothness ("Smoothness Coefficient", Range(0.0, 1.0)) = 1.0 _RimCoe ("Rim Coefficient", Range(0.0, 1.0)) = 1.0 _DiffuseThreshold ("Diffuse Threshold", Range(0.0, 1.0)) = 0.5 _SpecularThreshold ("Specular Threshold", Range(0.0, 1.0)) = 0.5 _RimThreshold ("Rim Threshold", Range(0.0, 1.0)) = 0.5 _ShadowThreshold ("Shadow Threshold", Range(0.0, 1.0)) = 0.5 //_OutlineScaler ("Outline Scaler", Range(0.0, 1.0)) = 0.5 //_OutlineColor ("Outline Color", Color) = (0, 0, 0, 1) } HLSLINCLUDE ENDHLSL SubShader { Tags { "RenderType"="Opaque" } LOD 100 // Cel shader Pass { Cull Back Tags { "LightMode" = "UniversalForward" } HLSLPROGRAM #pragma vertex vert #pragma fragment frag #pragma multi_compile _ _MAIN_LIGHT_SHADOWS #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" struct a2v { float4 vertexOS : POSITION; float3 normalOS : NORMAL; float2 uv : TEXCOORD0; }; struct v2f { float4 vertexCS : SV_POSITION; float4 vertexWS : TEXCOORD0; float3 normalWS : TEXCOORD1; //SHADOW_COORDS(2) }; float4 _SurfaceColor; float _Smoothness; float _RimCoe; float _DiffuseThreshold; float _SpecularThreshold; float _RimThreshold; float _ShadowThreshold; v2f vert (a2v v) { v2f o; o.vertexCS = mul(UNITY_MATRIX_MVP, v.vertexOS); o.vertexWS = mul(UNITY_MATRIX_M, v.vertexOS); o.normalWS = mul((float3x3)UNITY_MATRIX_M, v.normalOS); return o; } float4 frag (v2f i) : SV_Target { // Get light Light l = GetMainLight(TransformWorldToShadowCoord(i.vertexWS.xyz)); // Calculate shadow float shadow = step(_ShadowThreshold, saturate(l.shadowAttenuation)); // Calculate diffuse float diffuse = saturate(dot(i.normalWS, l.direction)); diffuse *= shadow; diffuse = step(_DiffuseThreshold, diffuse); // Get view direction float3 viewDirWS = normalize(_WorldSpaceCameraPos.xyz - i.vertexWS.xyz); float3 h = normalize(l.direction + viewDirWS); // Calculate specular float specular = pow(saturate(dot(i.normalWS, h)), exp2(10 * _Smoothness + 1)); specular *= diffuse * _Smoothness; specular = step(_SpecularThreshold, specular); // Calculate rim light float rim = 1 - dot(viewDirWS, i.normalWS); rim *= pow(diffuse, _RimCoe); rim = step(_RimThreshold, rim); // Get ambient //float3 ambient = UNITY_LIGHTMODEL_AMBIENT.xyz; float3 ambient = float3(unity_SHAr.w, unity_SHAg.w, unity_SHAb.w); float4 outColor = float4(l.color.rgb * (diffuse + max(specular, rim)) + ambient, 1) * _SurfaceColor; return float4(shadow, shadow, shadow, 1); //return outColor; } ENDHLSL } // Shadow UsePass "VertexLit/SHADOWCASTER" } }