Search Unity

Question People Occlusion - There's no soft blending between virtual content and Human body

Discussion in 'AR' started by TheKakarin, Apr 6, 2021.

  1. TheKakarin

    TheKakarin

    Joined:
    Jul 28, 2017
    Posts:
    3
    Hello,

    I'm using People Occlusion in one of my projects and I saw that the blending between virtual content and the human body is better in a sample done by apple than a build done from Unity.

    unity.png ios.png

    I've checked Unity's shader (ARKitBackground) and the metal shader and it seems that Unity's shader is missing this blending part from fragment shader, especially these 3 lines(there might be more I don't know):
    half alpha = half(alphaTexture.sample(s, cameraTexCoord).r);
    half4 occluderResult = mix(sceneColor, cameraColor, alpha);
    half4 mattingResult = mix(sceneColor, occluderResult, showOccluder);

    I've tried to convert them from metal but without any success.

    Does anyone know how to fix this issue?
     

    Attached Files: