SHA256
Fix Single Frame Delay in Capture
This commit is contained in:
2 files changed
+10
-2
No files matched your search
@@ -1,3 +1,4 @@
|
||||
using System.Collections;
|
||||
using System.Reflection;
|
||||
using HarmonyLib;
|
||||
using UnityEngine;
|
||||
@@ -16,10 +17,17 @@ namespace ADOFAIRenderer.Core
|
||||
|
||||
private void LateUpdate()
|
||||
{
|
||||
StartCoroutine(PostFrameCoroutine());
|
||||
}
|
||||
|
||||
private IEnumerator PostFrameCoroutine()
|
||||
{
|
||||
yield return new WaitForEndOfFrame();
|
||||
|
||||
var val = (MeshRenderer)_camQuadMeshField!.GetValue(scrCamera.instance);
|
||||
if (RenderManager.Instance)
|
||||
{
|
||||
RenderManager.Instance.OnPostRender(val.material.mainTexture as RenderTexture);
|
||||
RenderManager.Instance.OnPostFrame(val.sharedMaterial.mainTexture as RenderTexture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user