remove sodium extra
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
package me.cortex.voxy.client.compat;
|
||||
|
||||
import me.flashyreese.mods.sodiumextra.client.SodiumExtraClientMod;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
|
||||
public class SodiumExtra {
|
||||
public static final boolean HAS_SODIUM_EXTRA = FabricLoader.getInstance().isModLoaded("sodium-extra");
|
||||
public static boolean useSodiumExtraCulling() {
|
||||
if (!HAS_SODIUM_EXTRA) {
|
||||
return false;
|
||||
}
|
||||
return useSodiumExtraCulling0();
|
||||
}
|
||||
|
||||
private static boolean useSodiumExtraCulling0() {
|
||||
return !SodiumExtraClientMod.options().renderSettings.globalFog;
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,6 @@ package me.cortex.voxy.client.core.rendering;
|
||||
|
||||
import it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap;
|
||||
import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
|
||||
import me.cortex.voxy.client.VoxyClient;
|
||||
import me.cortex.voxy.client.compat.SodiumExtra;
|
||||
import me.cortex.voxy.client.core.AbstractRenderPipeline;
|
||||
import me.cortex.voxy.client.core.gl.GlBuffer;
|
||||
import me.cortex.voxy.client.core.gl.GlVertexArray;
|
||||
@@ -56,7 +54,6 @@ public class ChunkBoundRenderer {
|
||||
this.rasterShader = Shader.makeAuto()
|
||||
.addSource(ShaderType.VERTEX, vert)
|
||||
.defineIf("TAA", taa != null)
|
||||
.defineIf("USE_SODIUM_EXTRA_CULLING", SodiumExtra.useSodiumExtraCulling())
|
||||
.add(ShaderType.FRAGMENT, "voxy:chunkoutline/outline.fsh")
|
||||
.compile()
|
||||
.ubo(0, this.uniformBuffer)
|
||||
|
||||
@@ -15,18 +15,9 @@ ivec3 unpackPos(ivec2 pos) {
|
||||
}
|
||||
|
||||
bool shouldRender(ivec3 icorner) {
|
||||
#ifdef USE_SODIUM_EXTRA_CULLING
|
||||
#define MIN 0
|
||||
#define MAX 16
|
||||
#else
|
||||
#define MIN 1
|
||||
#define MAX 17
|
||||
#endif
|
||||
vec3 corner = vec3(mix(mix(ivec3(0), icorner-MIN, greaterThan(icorner-MIN, ivec3(0))), icorner+MAX, lessThan(icorner+MAX, ivec3(0))))-negInnerSec.xyz;
|
||||
bool visible = (corner.x*corner.x + corner.z*corner.z) < (negInnerSec.w*negInnerSec.w);
|
||||
#ifndef USE_SODIUM_EXTRA_CULLING
|
||||
visible = visible && abs(corner.y) < negInnerSec.w;
|
||||
#endif
|
||||
return visible;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user