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; }
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; }
void Start() { _filter = new SegmentationFilter(_resources); _filter.ProcessImage(_sourceImage); _imageUI.texture = _filter.MaskTexture; }