Change frame time (used by Iris) to be based on replay or video time

Iris derives that one from the frameStartNanos argument passed to the render
method and shaders usually use it to do animations. Prior to this commit we
always pass 0 which effectively froze any shader animations.

With this commit, we now compute the frameStartNanos based on the
FPS of the video we are rendering (so animations will happen in real time when
watching the video) or based on the time in the replay (so animations will
be influenced by playback speed / be frozen if the replay is frozen).
We default to the video time based approach because the replay time one may
produce undesirable results when it comes to things like motion blur and TAA.
This commit is contained in:
Jonas Herzig
2021-06-29 12:48:38 +02:00
parent 3f2456ba65
commit e85618a27c
2 changed files with 22 additions and 5 deletions

View File

@@ -7,4 +7,6 @@ public final class Setting<T> {
new SettingsRegistry.SettingKeys<>("advanced", "renderPath", null, "./replay_videos/");
public static final SettingsRegistry.SettingKey<Boolean> SKIP_POST_RENDER_GUI =
new SettingsRegistry.SettingKeys<>("advanced", "skipPostRenderGui", null, false);
public static final SettingsRegistry.SettingKey<Boolean> FRAME_TIME_FROM_WORLD_TIME =
new SettingsRegistry.SettingKeys<>("render", "frameTimeFromWorldTime", null, false);
}