Exemplo n.º 1
0
    private void Update()
    {
        if (screenManager != null && !textureOverlayInit) //Need to tell the shader to apply the mask.
        {
            if (screenManager.ManageKeywordForwardMat(true, "DEPTH_ALPHA"))
            {
                textureOverlayInit = true;
            }
        }

        if (toUpdateConfig) //Need to load available greenscreen configuration data into the current, active data.
        {
            toUpdateConfig = false;
            LoadGreenScreenData();
        }

        if (enableGarbageMatte) //Set up the garbage matte if needed.
        {
            if (garbageMatte != null && garbageMatte.IsInit)
            {
                garbageMatte.Update();
            }
            else
            {
                garbageMatte = new GarbageMatte(GetComponent <Camera>(), finalMat, transform, garbageMatte);
            }
        }
    }
    private void Update()
    {
        if (screenManager != null && !textureOverlayInit)
        {
            if (screenManager.ManageKeyWordForwardMat(true, "DEPTH_ALPHA"))
            {
                textureOverlayInit = true;
            }
        }

        if (toUpdateConfig)
        {
            toUpdateConfig = false;
            LoadGreenScreenData();
        }
        if (enableGarbageMatte)
        {
            if (garbageMatte != null && garbageMatte.IsInit)
            {
                garbageMatte.Update();
            }
            else
            {
                garbageMatte = new GarbageMatte(GetComponent <Camera>(), finalMat, transform, garbageMatte);
            }
        }
    }