You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I understand from the code, when I use CaptureFromCamera and make it offline, a camera renders to two things
Screen (which is the render you're seeing)
A render texture for video recording
So, doing two works per frame slows down by half.
Is there a way to disable the default render and show the render texture created by CaptureFromCamera? I assume this will speed up rendering by almost 2x?
The text was updated successfully, but these errors were encountered:
So, my workaround is to create a Render Texture and use CaptureFromTexture component.
This way, AVProMovieCapture only uses rendertexture without the need of bliting or else. So it's faster.
I had to make some functions public, but it does the job.
RenderTextureFormattextureFormat=Utils.GetBestRenderTextureFormat(false,false,false);intaaLevel=capture.GetCameraAntiAliasingLevel(Camera.main);varrenderTexture=RenderTexture.GetTemporary(res.x,res.y,24,textureFormat,RenderTextureReadWrite.Default,aaLevel);renderTexture.name="[AVProMovieCapture] Camera Target";renderTexture.Create();Camera.main.targetTexture=renderTexture;WorldRuntimeRefs.I.renderTexture=renderTexture;WorldRuntimeRefs.I.renderPreviewContainer.SetActive(true);capture.SetSourceTexture(renderTexture);capture.FrameRate=60;capture.IsRealTime=false;capture.AllowOfflineVSyncDisable=true;
AVPro Movie Capture Version
5.3.2-MOBILE
Which platform is your question for?
iOS, Android
Your question
As far as I understand from the code, when I use
CaptureFromCamera
and make it offline, a camera renders to two thingsSo, doing two works per frame slows down by half.
Is there a way to disable the default render and show the render texture created by
CaptureFromCamera
? I assume this will speed up rendering by almost 2x?The text was updated successfully, but these errors were encountered: