Add FOV slider for spherical render methods

Before uploading to YouTube, convert all spherical non-mp4 files to mp4 to be able to inject metadata
Properly re-throw errors during the rendering pipeline
This commit is contained in:
CrushedPixel
2018-12-06 01:29:31 +01:00
parent 8314803cda
commit a7ec6524b7
11 changed files with 340 additions and 176 deletions

View File

@@ -22,6 +22,7 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.shader.Framebuffer;
import net.minecraft.util.ReportedException;
import net.minecraft.util.Timer;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.Display;
@@ -150,12 +151,15 @@ public class VideoRenderer implements RenderInfo {
renderingPipeline.run();
if (settings.isInject360Metadata()) {
if (settings.getRenderMethod() == RenderSettings.RenderMethod.ODS) {
MetadataInjector.injectODSMetadata(settings.getOutputFile());
} else {
MetadataInjector.inject360Metadata(settings.getOutputFile());
}
if (mc.hasCrashed) {
setFailure(mc.crashReporter.getCrashCause());
throw new ReportedException(mc.crashReporter);
}
if (settings.isInjectSphericalMetadata()) {
MetadataInjector.injectMetadata(settings.getRenderMethod(), settings.getOutputFile(),
settings.getTargetVideoWidth(), settings.getTargetVideoHeight(),
settings.getSphericalFovX(), settings.getSphericalFovY());
}
finish();