Things
This commit is contained in:
@@ -51,7 +51,7 @@ public class RenderService<T extends AbstractSectionRenderer<J, ?>, J extends Vi
|
|||||||
|
|
||||||
//Max sections: ~500k
|
//Max sections: ~500k
|
||||||
//Max geometry: 1 gb
|
//Max geometry: 1 gb
|
||||||
this.sectionRenderer = (T) createSectionRenderer(this.modelService.getStore(),1<<20, (1L<<32)-1024);
|
this.sectionRenderer = (T) createSectionRenderer(this.modelService.getStore(),1<<20, (1L<<31)-1024);
|
||||||
Logger.info("Using renderer: " + this.sectionRenderer.getClass().getSimpleName());
|
Logger.info("Using renderer: " + this.sectionRenderer.getClass().getSimpleName());
|
||||||
|
|
||||||
//Do something incredibly hacky, we dont need to keep the reference to this around, so just connect and discard
|
//Do something incredibly hacky, we dont need to keep the reference to this around, so just connect and discard
|
||||||
|
|||||||
@@ -4,18 +4,23 @@ import com.mojang.blaze3d.systems.RenderSystem;
|
|||||||
import me.cortex.voxy.client.config.VoxyConfig;
|
import me.cortex.voxy.client.config.VoxyConfig;
|
||||||
import me.cortex.voxy.client.core.gl.Capabilities;
|
import me.cortex.voxy.client.core.gl.Capabilities;
|
||||||
import me.cortex.voxy.client.core.gl.GlBuffer;
|
import me.cortex.voxy.client.core.gl.GlBuffer;
|
||||||
|
import me.cortex.voxy.client.core.model.ColourDepthTextureData;
|
||||||
|
import me.cortex.voxy.client.core.model.ModelTextureBakery;
|
||||||
import me.cortex.voxy.client.core.rendering.post.PostProcessing;
|
import me.cortex.voxy.client.core.rendering.post.PostProcessing;
|
||||||
import me.cortex.voxy.client.core.rendering.util.DownloadStream;
|
import me.cortex.voxy.client.core.rendering.util.DownloadStream;
|
||||||
|
import me.cortex.voxy.client.core.rendering.util.RawDownloadStream;
|
||||||
import me.cortex.voxy.client.core.util.IrisUtil;
|
import me.cortex.voxy.client.core.util.IrisUtil;
|
||||||
import me.cortex.voxy.common.Logger;
|
import me.cortex.voxy.common.Logger;
|
||||||
import me.cortex.voxy.common.thread.ServiceThreadPool;
|
import me.cortex.voxy.common.thread.ServiceThreadPool;
|
||||||
import me.cortex.voxy.common.world.WorldEngine;
|
import me.cortex.voxy.common.world.WorldEngine;
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.render.Camera;
|
import net.minecraft.client.render.Camera;
|
||||||
import net.minecraft.client.render.Frustum;
|
import net.minecraft.client.render.Frustum;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import org.joml.Matrix4f;
|
import org.joml.Matrix4f;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
import org.lwjgl.system.MemoryUtil;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -67,11 +72,30 @@ public class VoxyRenderSystem {
|
|||||||
public void renderOpaque(MatrixStack matrices, double cameraX, double cameraY, double cameraZ) {
|
public void renderOpaque(MatrixStack matrices, double cameraX, double cameraY, double cameraZ) {
|
||||||
/*
|
/*
|
||||||
int allocation = downstream.download(2*4*6*16*16, ptr->{
|
int allocation = downstream.download(2*4*6*16*16, ptr->{
|
||||||
|
ColourDepthTextureData[] textureData = new ColourDepthTextureData[6];
|
||||||
|
final int FACE_SIZE = 16*16;
|
||||||
|
for (int face = 0; face < 6; face++) {
|
||||||
|
long faceDataPtr = ptr + (FACE_SIZE*4)*face*2;
|
||||||
|
int[] colour = new int[FACE_SIZE];
|
||||||
|
int[] depth = new int[FACE_SIZE];
|
||||||
|
|
||||||
|
//Copy out colour
|
||||||
|
for (int i = 0; i < FACE_SIZE; i++) {
|
||||||
|
//De-interpolate results
|
||||||
|
colour[i] = MemoryUtil.memGetInt(faceDataPtr+ (i*4*2));
|
||||||
|
depth[i] = MemoryUtil.memGetInt(faceDataPtr+ (i*4*2)+4);
|
||||||
|
}
|
||||||
|
|
||||||
|
textureData[face] = new ColourDepthTextureData(colour, depth, 16, 16);
|
||||||
|
}
|
||||||
|
|
||||||
|
int a = 0;
|
||||||
});
|
});
|
||||||
mtb.renderFacesToStream(Blocks.WHITE_STAINED_GLASS.getDefaultState(), 123456, false, downstream.getBufferId(), allocation);
|
mtb.renderFacesToStream(Blocks.GRASS_BLOCK.getDefaultState(), 123456, false, downstream.getBufferId(), allocation);
|
||||||
downstream.submit();
|
downstream.submit();
|
||||||
downstream.tick();
|
downstream.tick();
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//if (true) return;
|
//if (true) return;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class VoxyCommon implements ModInitializer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//This is hardcoded like this because people do not understand what they are doing
|
//This is hardcoded like this because people do not understand what they are doing
|
||||||
private static final boolean GlobalVerificationDisableOverride = true;//System.getProperty("voxy.verificationDisableOverride", "false").equals("true");
|
private static final boolean GlobalVerificationDisableOverride = false;//System.getProperty("voxy.verificationDisableOverride", "false").equals("true");
|
||||||
public static boolean isVerificationFlagOn(String name) {
|
public static boolean isVerificationFlagOn(String name) {
|
||||||
return (!GlobalVerificationDisableOverride) && System.getProperty("voxy."+name, "true").equals("true");
|
return (!GlobalVerificationDisableOverride) && System.getProperty("voxy."+name, "true").equals("true");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user