SHA256
Add Render Waiting Visualization
This commit is contained in:
1 parent
c16fe25e7d
commit
f807eae382
2 files changed
+15
-9
No files matched your search
@@ -53,7 +53,7 @@ namespace ADOFAIRenderer.Component
|
|||||||
public static int PassCount = 0;
|
public static int PassCount = 0;
|
||||||
public static bool EndRequested = false;
|
public static bool EndRequested = false;
|
||||||
public static bool EndSuccessful = false;
|
public static bool EndSuccessful = false;
|
||||||
private static int _wonFrame = -1;
|
public static int WonFrame = -1;
|
||||||
|
|
||||||
private static bool _renderSetup;
|
private static bool _renderSetup;
|
||||||
|
|
||||||
@@ -109,14 +109,14 @@ namespace ADOFAIRenderer.Component
|
|||||||
}
|
}
|
||||||
else if (scrController.instance.state == States.Won)
|
else if (scrController.instance.state == States.Won)
|
||||||
{
|
{
|
||||||
if (_wonFrame == -1)
|
if (WonFrame == -1)
|
||||||
{
|
{
|
||||||
_wonFrame = FrameCount;
|
WonFrame = FrameCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
var extraFrames = (int)Math.Ceiling(Configuration.EndWaitTime * Configuration.TargetFPS);
|
var extraFrames = (int)Math.Ceiling(Configuration.EndWaitTime * Configuration.TargetFPS);
|
||||||
|
|
||||||
if (FrameCount - _wonFrame < extraFrames) return;
|
if (FrameCount - WonFrame < extraFrames) return;
|
||||||
RenderMod.IsRendering = RenderMod.IsCapturing = false;
|
RenderMod.IsRendering = RenderMod.IsCapturing = false;
|
||||||
Time.timeScale = 1f;
|
Time.timeScale = 1f;
|
||||||
scrConductor.currentPreset.inputOffset = _originalInputOffset;
|
scrConductor.currentPreset.inputOffset = _originalInputOffset;
|
||||||
@@ -212,10 +212,8 @@ namespace ADOFAIRenderer.Component
|
|||||||
RenderMod.SkipCount = 0;
|
RenderMod.SkipCount = 0;
|
||||||
EndRequested = false;
|
EndRequested = false;
|
||||||
EndSuccessful = false;
|
EndSuccessful = false;
|
||||||
_wonFrame = -1;
|
WonFrame = -1;
|
||||||
|
|
||||||
double targetFps = Configuration.TargetFPS;
|
|
||||||
double videoFps = Configuration.VideoFPS;
|
|
||||||
var targetFps = Configuration.TargetFPS;
|
var targetFps = Configuration.TargetFPS;
|
||||||
var videoFps = Configuration.VideoFPS;
|
var videoFps = Configuration.VideoFPS;
|
||||||
float bitrate = Configuration.Bitrate;
|
float bitrate = Configuration.Bitrate;
|
||||||
|
|||||||
@@ -17,8 +17,16 @@ namespace ADOFAIRenderer.Patch.ClassPatch
|
|||||||
{
|
{
|
||||||
if (!RenderMod.IsRendering) return;
|
if (!RenderMod.IsRendering) return;
|
||||||
|
|
||||||
___txt.text = "Rendering";
|
___txt.text = "Rendering...";
|
||||||
if (RenderManager.Countdown > 0) ___txt.text += $" in {RenderManager.Countdown}..";
|
if (RenderManager.Countdown > 0) ___txt.text = $"Rendering in {RenderManager.Countdown}..";
|
||||||
|
|
||||||
|
if (RenderManager.WonFrame != -1)
|
||||||
|
{
|
||||||
|
var elapsedFrames = RenderManager.FrameCount - RenderManager.WonFrame;
|
||||||
|
var remainingTime = RenderManager.Configuration.EndWaitTime - elapsedFrames / RenderManager.Configuration.TargetFPS;
|
||||||
|
if (remainingTime < 0) remainingTime = 0;
|
||||||
|
___txt.text += $"\nWaiting for {remainingTime:F1}s...";
|
||||||
|
}
|
||||||
|
|
||||||
___txt.color = ___defaultColor;
|
___txt.color = ___defaultColor;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user