제목 없는 동영상 (17).gif

1. 해결법 참고 영상

https://www.youtube.com/watch?v=xkcCWqifT9M

😪 해당 방법 문제점

2. 우리 프로젝트에 적용 방법

2-1. 셰이더 생성

Stencil Object의 Shader Graph

Shader "Custom/StencilObejct"
{
    Properties
    {
        _Color("Color", Color) = (1, 1, 1, 0)
        _MainTex("Albedo(RGB)", 2D)="White"{}
        _Glossiness("Smoothness", Range(0, 1)) = 0
        _Metallic("Metallic", Range(0, 1)) = 0
        [HideInInspector]_QueueOffset("_QueueOffset", Float) = 0
        [HideInInspector]_QueueControl("_QueueControl", Float) = -1
        [HideInInspector][NoScaleOffset]unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
        [HideInInspector][NoScaleOffset]unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
        [HideInInspector][NoScaleOffset]unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
    }
    SubShader
    {
        Tags
        {
            "RenderType"="Opaque"
            "UniversalMaterialType" = "Lit"
        }

        Stencil {
            Ref 1
            Comp equal
        }
        Pass
        {
            Name "Universal Forward"
            Tags
            {
                "LightMode" = "UniversalForward"
            }
        
        ........