fix render doc, add samlper to shader, nearest depth tex in view

This commit is contained in:
mcrcortex
2025-12-24 15:54:55 +10:00
parent 837b779aa9
commit a7dc2112fa
4 changed files with 8 additions and 4 deletions

View File

@@ -16,6 +16,6 @@ fabric_version=0.140.0+1.21.11
# Mod Properties
mod_version = 0.2.8-alpha
mod_version = 0.2.9-alpha
maven_group = me.cortex
archives_base_name = voxy

View File

@@ -49,6 +49,9 @@ public class GlViewCapture {
glTextureParameteri(this.metaTex.id, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTextureParameteri(this.metaTex.id, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTextureParameteri(this.depthTex.id, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTextureParameteri(this.depthTex.id, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
this.copyOutShader = Shader.makeAuto()
.define("WIDTH", width)
.define("HEIGHT", height)

View File

@@ -34,7 +34,7 @@ public class BasicSectionGeometryData implements IGeometryData {
Logger.info("if your game crashes/exits here without any other log message, try manually decreasing the geometry capacity");
glGetError();//Clear any errors
GlBuffer buffer = null;
if (!(Capabilities.INSTANCE.isNvidia)) {// && ThreadUtils.isWindows
if (!(Capabilities.INSTANCE.isNvidia&&Capabilities.INSTANCE.sparseBuffer)) {//This hack makes it so it doesnt crash on renderdoc
buffer = new GlBuffer(geometryCapacity, false);//Only do this if we are not on nvidia
//TODO: FIXME: TEST, see if the issue is that we are trying to zero the entire buffer, try only zeroing increments
// or dont zero it at all

View File

@@ -1,5 +1,6 @@
package me.cortex.voxy.client.iris;
import net.irisshaders.iris.gl.sampler.GlSampler;
import net.irisshaders.iris.gl.sampler.SamplerHolder;
import net.irisshaders.iris.gl.texture.TextureType;
import net.irisshaders.iris.pipeline.IrisRenderingPipeline;
@@ -32,7 +33,7 @@ public class VoxySamplers {
return 0;
}
return dt.id;
}, null, opaqueNames);
}, ()->GlSampler.MIPPED_NEAREST_NEAREST, opaqueNames);
samplers.addDynamicSampler(TextureType.TEXTURE_2D, () -> {
var pipeData = ((IGetIrisVoxyPipelineData)pipeline).voxy$getPipelineData();
@@ -48,7 +49,7 @@ public class VoxySamplers {
return 0;
}
return dt.id;
}, null, translucentNames);
}, ()->GlSampler.MIPPED_NEAREST_NEAREST, translucentNames);
}
}
}