예제 #1
0
        void Update()
        {
            _filter.ProcessImage(_webcam.Texture);

            _material.SetTexture("_SourceTexture", _webcam.Texture);
            _material.SetTexture("_MaskTexture", _filter.MaskTexture);
            _material.SetTexture("_BGTexture", _bgImage);
            Graphics.Blit(null, _composited, _material, (int)_outputMode);

            _outputUI.texture = _composited;
        }
예제 #2
0
        void Update()
        {
            _filter.ProcessImage(_webcam.Texture);

            _material.SetTexture("_SourceTexture", _webcam.Texture);
            _material.SetTexture("_MaskTexture", _filter.MaskTexture);
            _material.SetTexture("_BGTexture", _background);
            Graphics.Blit(null, _composited, _material, 0);

            _imageUI.texture = _composited;
        }
예제 #3
0
 void Start()
 {
     _filter = new SegmentationFilter(_resources);
     _filter.ProcessImage(_sourceImage);
     _imageUI.texture = _filter.MaskTexture;
 }