Everything is ready, but on some objects there is an artifact that highlights it.
Here's custom func.:
void surf_float(
float3 _WorldPos,
float3 _LightPos,
float3 _LightDir,
float _LightAngleCos,
float _Smoothness,
float3 _BakedLightPos,
float3 _BakedLightDir,
float _BakedLightAngleCos,
float _TextureAlpha,
out float intersectionFactor,
out float combinedVisibility,
out float alphaOutput
)
{
float3 toPixel = normalize(_WorldPos - _LightPos.xyz);
float dotProduct = dot(toPixel, _LightDir);
float currentVisibility = smoothstep(_LightAngleCos, _LightAngleCos + _Smoothness, dotProduct);
float3 toPixelBaked = normalize(_WorldPos - _BakedLightPos.xyz);
float dotProductBaked = dot(toPixelBaked, _BakedLightDir);
float bakedVisibility = smoothstep(_BakedLightAngleCos, _BakedLightAngleCos + _Smoothness, dotProductBaked);
combinedVisibility = currentVisibility * _TextureAlpha;
float visibilityFade = smoothstep(0.0, _Smoothness, min(currentVisibility, bakedVisibility));
float intensityFade = 1.0 - visibilityFade;
intersectionFactor = 1.0 - smoothstep(0.0, 0.2, intensityFade);
alphaOutput = combinedVisibility * _TextureAlpha;
alphaOutput = max(alphaOutput, 0.01 * _TextureAlpha);
}
alphaOutput multiplies with sample texture of main texture and goes to Alpha of master Node. How to fix it, pls