GPU Video Player
얼마전 Unity에서 Video Player를 통해 고용량의 비디오 클립을 재생하는데 버벅거림이 발생하였다.
해결방법은 GPU Decoding 방식으로 변경하면 CPU 사용량을 급격히 줄일수 있다.
GPU Decoding 관련 자료는
https://software.intel.com/en-us/articles/hardware-accelerated-video-decode-in-unity
Hardware-Accelerated Video Decode in Unity*
This tutorial teachs you how to merge the hardware decode path within Unity* software. The main components within this solution are the creation of an external video texture mapped to Unity software, the creation of the media player, and the calls exposed
software.intel.com
Plugin 소스와 사용예제를 다운받을수 있다.
예제를 조금만 다듬으면 개발중인 프로젝트에서도 바로 사용할 수 있다.
예제를 다운받고 Playback.cs 를 보면 OnEnable 함수에 자기에 부착되어 있은 Renderer의 Material 에 부착하는데..
이런식으로 수정해서 다른 Material에 부착도 할 수 있다