diff --git a/Assets/Visualizer.cs b/Assets/Visualizer.cs index 5946a1b..b2fa419 100644 --- a/Assets/Visualizer.cs +++ b/Assets/Visualizer.cs @@ -40,14 +40,14 @@ void LateUpdate() _bodypix.ProcessImage(_source.Texture); _previewUI.texture = _source.Texture; - Graphics.Blit(_bodypix.Mask, _mask, _material, 0); + Graphics.Blit(_bodypix.MaskTexture, _mask, _material, 0); } void OnRenderObject() { if (!_drawSkeleton) return; - _material.SetBuffer("_Keypoints", _bodypix.Keypoints); + _material.SetBuffer("_Keypoints", _bodypix.KeypointBuffer); _material.SetFloat("_Aspect", (float)_resolution.x / _resolution.y); _material.SetPass(1); diff --git a/Packages/jp.keijiro.bodypix/Script/BodyPixRuntime.cs b/Packages/jp.keijiro.bodypix/Script/BodyPixRuntime.cs index 3f92658..c44c589 100644 --- a/Packages/jp.keijiro.bodypix/Script/BodyPixRuntime.cs +++ b/Packages/jp.keijiro.bodypix/Script/BodyPixRuntime.cs @@ -20,10 +20,10 @@ public void Dispose() public void ProcessImage(Texture sourceTexture) => RunModel(sourceTexture); - public RenderTexture Mask + public RenderTexture MaskTexture => _buffers.mask; - public GraphicsBuffer Keypoints + public GraphicsBuffer KeypointBuffer => _buffers.keypoints; #endregion