Hey there,
I am trying to apply a shadow map on my model and use it to calculate transmittance. But I am facing a common issue of shadow-mapping and I can't fix it by simply modifying the offset because it creates discontinuities on surface and shapes.
Here is the issue :
[attachment=31992:shadow.jpg]
This can remove the issue but it creates bad behaviour around the ears for example. This is not an acceptable solution as the shadow map is not correctly applied on some parts.
float cosAngle = saturate(1.0f - dot(wLight, wNormal));
float3 scaledNormalOffset = wNormal * (_Offset * cosAngle * _ShadowMap_TexelSize);
float4 shadowCoord = mul(unity_World2Shadow[0], float4(i.wPos + scaledNormalOffset, 1.0f));
float shadow = tex2D(_ShadowMap, shadowCoord);