Add depth map export (closes #371)

This commit is contained in:
Jonas Herzig
2020-10-04 13:44:14 +02:00
parent a7d424679b
commit d8135d9038
26 changed files with 283 additions and 130 deletions

View File

@@ -5,6 +5,7 @@ import com.replaymod.core.utils.Utils;
import com.replaymod.core.versions.MCVer;
import com.replaymod.extras.ReplayModExtras;
import com.replaymod.render.frame.BitmapFrame;
import com.replaymod.render.rendering.Channel;
import com.replaymod.render.rendering.FrameConsumer;
import com.replaymod.replay.ReplayModReplay;
import de.johni0702.minecraft.gui.utils.lwjgl.ReadableDimension;
@@ -13,6 +14,7 @@ import net.minecraft.util.crash.CrashReport;
import java.io.File;
import java.io.IOException;
import java.util.Map;
public class ScreenshotWriter implements FrameConsumer<BitmapFrame> {
@@ -23,7 +25,9 @@ public class ScreenshotWriter implements FrameConsumer<BitmapFrame> {
}
@Override
public void consume(BitmapFrame frame) {
public void consume(Map<Channel, BitmapFrame> channels) {
BitmapFrame frame = channels.get(Channel.BRGA);
// skip the first frame, in which not all chunks are properly loaded
if (frame.getFrameId() == 0) return;