Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -66,6 +66,7 @@ def gitCommitHash = { ->
|
||||
}
|
||||
|
||||
def buildtime = {System.currentTimeSeconds()}
|
||||
|
||||
processResources {
|
||||
def time = buildtime()
|
||||
def hash = gitCommitHash()
|
||||
|
||||
@@ -53,6 +53,11 @@ public abstract class AbstractRenderPipeline extends TrackedObject {
|
||||
private final FullscreenBlit depthMaskBlit = new FullscreenBlit("voxy:post/fullscreen2.vert", "voxy:post/noop.frag");
|
||||
private final FullscreenBlit depthSetBlit = new FullscreenBlit("voxy:post/fullscreen2.vert", "voxy:post/depth0.frag");
|
||||
private final FullscreenBlit depthCopy = new FullscreenBlit("voxy:post/fullscreen2.vert", "voxy:post/depth_copy.frag");
|
||||
private static final int DEPTH_SAMPLER = glGenSamplers();
|
||||
static {
|
||||
glSamplerParameteri(DEPTH_SAMPLER, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glSamplerParameteri(DEPTH_SAMPLER, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
}
|
||||
|
||||
protected AbstractRenderPipeline(AsyncNodeManager nodeManager, NodeCleaner nodeCleaner, HierarchicalOcclusionTraverser traversal, BooleanSupplier frexSupplier) {
|
||||
this.frexStillHasWork = frexSupplier;
|
||||
@@ -109,9 +114,11 @@ public abstract class AbstractRenderPipeline extends TrackedObject {
|
||||
// the mismatched formats in this case is the d32 to d24s8
|
||||
glBindFramebuffer(GL30.GL_FRAMEBUFFER, targetFb);
|
||||
|
||||
this.depthCopy.bind();
|
||||
int depthTexture = glGetNamedFramebufferAttachmentParameteri(sourceFrameBuffer, GL_DEPTH_ATTACHMENT, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME);
|
||||
glBindTextureUnit(0, depthTexture);
|
||||
|
||||
glBindSampler(0, DEPTH_SAMPLER);
|
||||
glUniform2f(1,((float)width)/srcWidth, ((float)height)/srcHeight);
|
||||
glColorMask(false,false,false,false);
|
||||
this.depthCopy.blit();
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ public class IrisVoxyRenderPipeline extends AbstractRenderPipeline {
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
}
|
||||
|
||||
if (this.data.useViewportDims) {
|
||||
if (!this.data.useViewportDims) {
|
||||
srcWidth = viewport.width;
|
||||
srcHeight = viewport.height;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package me.cortex.voxy.client.mixin.minecraft;
|
||||
|
||||
import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
|
||||
import net.minecraft.world.level.chunk.DataLayer;
|
||||
import net.minecraft.world.level.lighting.LayerLightSectionStorage;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(LayerLightSectionStorage.class)
|
||||
public class MixinLayerLightSectionStorage {
|
||||
@Redirect(method = "<init>", at = @At(value = "INVOKE", target = "Lit/unimi/dsi/fastutil/longs/Long2ObjectMaps;synchronize(Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;)Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;"), remap = false)
|
||||
private static Long2ObjectMap<DataLayer> voxy$removeSynchronized(Long2ObjectMap<DataLayer> map) {
|
||||
return map;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
#version 330 core
|
||||
|
||||
layout(binding = 0) uniform sampler2D depthTex;
|
||||
layout(location = 1) uniform vec2 scaleFactor;
|
||||
|
||||
in vec2 UV;
|
||||
void main() {
|
||||
gl_FragDepth = texture(depthTex, UV).r;
|
||||
gl_FragDepth = texture(depthTex, UV*scaleFactor).r;
|
||||
}
|
||||
@@ -5,28 +5,28 @@
|
||||
"client": [
|
||||
"flashback.MixinFlashbackMeta",
|
||||
"flashback.MixinFlashbackRecorder",
|
||||
"iris.MixinLevelRenderer",
|
||||
"iris.MixinPackRenderTargetDirectives",
|
||||
"iris.CustomUniformsAccessor",
|
||||
"iris.IrisRenderingPipelineAccessor",
|
||||
"iris.MixinIris",
|
||||
"iris.MixinIrisRenderingPipeline",
|
||||
"iris.MixinIrisSamplers",
|
||||
"iris.MixinLevelRenderer",
|
||||
"iris.MixinMatrixUniforms",
|
||||
"iris.MixinPackRenderTargetDirectives",
|
||||
"iris.MixinProgramSet",
|
||||
"iris.MixinShaderPackSourceNames",
|
||||
"iris.MixinStandardMacros",
|
||||
"minecraft.MixinClientLevel",
|
||||
"minecraft.MixinBlockableEventLoop",
|
||||
"minecraft.MixinClientChunkCache",
|
||||
"minecraft.MixinClientCommonPacketListenerImpl",
|
||||
"minecraft.MixinClientLevel",
|
||||
"minecraft.MixinClientPacketListener",
|
||||
"minecraft.MixinFogRenderer",
|
||||
"minecraft.MixinGlDebug",
|
||||
"minecraft.MixinLevelRenderer",
|
||||
"minecraft.MixinMinecraft",
|
||||
"minecraft.MixinRenderSystem",
|
||||
"minecraft.MixinBlockableEventLoop",
|
||||
"minecraft.MixinWindow",
|
||||
"minecraft.MixinLevelRenderer",
|
||||
"nvidium.MixinRenderPipeline",
|
||||
"sodium.AccessorChunkTracker",
|
||||
"sodium.AccessorSodiumWorldRenderer",
|
||||
@@ -34,7 +34,8 @@
|
||||
"sodium.MixinDefaultChunkRenderer",
|
||||
"sodium.MixinRenderSectionManager",
|
||||
"sodium.MixinSodiumOptionsGUI",
|
||||
"sodium.MixinSodiumWorldRenderer"
|
||||
"sodium.MixinSodiumWorldRenderer",
|
||||
"minecraft.MixinLayerLightSectionStorage"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
||||
@@ -28,7 +28,10 @@
|
||||
]
|
||||
},
|
||||
"mixins": [
|
||||
"client.voxy.mixins.json",
|
||||
{
|
||||
"config": "client.voxy.mixins.json",
|
||||
"environment": "client"
|
||||
},
|
||||
"common.voxy.mixins.json"
|
||||
],
|
||||
"depends": {
|
||||
|
||||
Reference in New Issue
Block a user