Common and version specific shader packages #10
No files matched your search
@@ -14,6 +14,9 @@ java {
|
|||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
maven {
|
||||||
|
url = "https://maven.taumc.org/releases"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -29,6 +32,17 @@ dependencies {
|
|||||||
compileOnly("com.google.guava:guava:31.1-jre")
|
compileOnly("com.google.guava:guava:31.1-jre")
|
||||||
compileOnly("org.ow2.asm:asm:9.6")
|
compileOnly("org.ow2.asm:asm:9.6")
|
||||||
compileOnly("org.ow2.asm:asm-tree:9.6")
|
compileOnly("org.ow2.asm:asm-tree:9.6")
|
||||||
|
def glslTransformLib = "org.taumc:glsl-transformation-lib:${glsl_transformation_lib_version}:fat"
|
||||||
|
def jcpp = "org.anarres:jcpp:1.4.14"
|
||||||
|
def shaderDeps = [glslTransformLib, jcpp]
|
||||||
|
shaderDeps.forEach {
|
||||||
|
implementation(it)
|
||||||
|
// TODO: Shadow
|
||||||
|
// shadow(it) {
|
||||||
|
// transitive = false
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package net.irisshaders.iris;
|
||||||
|
|
||||||
|
public class IrisConstants {
|
||||||
|
public static final String MODID = "embeddium";
|
||||||
|
/**
|
||||||
|
* The user-facing name of the mod. Moved into a constant to facilitate
|
||||||
|
* easy branding changes (for forks). You'll still need to change this
|
||||||
|
* separately in mixin plugin classes & the language files.
|
||||||
|
*/
|
||||||
|
public static final String MODNAME = "Celeritas";
|
||||||
|
}
|
||||||
+9
-4
@@ -1,24 +1,29 @@
|
|||||||
package net.irisshaders.iris;
|
package net.irisshaders.iris;
|
||||||
|
|
||||||
import com.mojang.logging.LogUtils;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.slf4j.Marker;
|
||||||
|
import org.slf4j.MarkerFactory;
|
||||||
|
|
||||||
public class IrisLogging {
|
public class IrisLogging {
|
||||||
|
public static final IrisLogging IRIS_LOGGER = new IrisLogging(IrisConstants.MODNAME);
|
||||||
|
|
||||||
|
|
||||||
public static boolean ENABLE_SPAM = false; // FabricLoader.getInstance().isDevelopmentEnvironment();
|
public static boolean ENABLE_SPAM = false; // FabricLoader.getInstance().isDevelopmentEnvironment();
|
||||||
|
public static final Marker FATAL_MARKER = MarkerFactory.getMarker("FATAL");
|
||||||
|
|
||||||
private final Logger logger;
|
private final Logger logger;
|
||||||
|
|
||||||
public IrisLogging(String loggerName) {
|
private IrisLogging(String loggerName) {
|
||||||
this.logger = LoggerFactory.getLogger(loggerName);
|
this.logger = LoggerFactory.getLogger(loggerName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void fatal(String fatal) {
|
public void fatal(String fatal) {
|
||||||
this.logger.error(LogUtils.FATAL_MARKER, fatal);
|
this.logger.error(FATAL_MARKER, fatal);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void fatal(String fatal, Throwable t) {
|
public void fatal(String fatal, Throwable t) {
|
||||||
this.logger.error(LogUtils.FATAL_MARKER, fatal, t);
|
this.logger.error(FATAL_MARKER, fatal, t);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void error(String error) {
|
public void error(String error) {
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+3
-2
@@ -1,10 +1,11 @@
|
|||||||
package net.irisshaders.iris.gl.blending;
|
package net.irisshaders.iris.gl.blending;
|
||||||
|
|
||||||
import net.irisshaders.iris.Iris;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import static net.irisshaders.iris.IrisLogging.IRIS_LOGGER;
|
||||||
|
|
||||||
public enum BlendModeFunction {
|
public enum BlendModeFunction {
|
||||||
ZERO(GL11.GL_ZERO),
|
ZERO(GL11.GL_ZERO),
|
||||||
ONE(GL11.GL_ONE),
|
ONE(GL11.GL_ONE),
|
||||||
@@ -28,7 +29,7 @@ public enum BlendModeFunction {
|
|||||||
try {
|
try {
|
||||||
return Optional.of(BlendModeFunction.valueOf(name));
|
return Optional.of(BlendModeFunction.valueOf(name));
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
Iris.logger.warn("Invalid blend mode! " + name);
|
IRIS_LOGGER.warn("Invalid blend mode! " + name);
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File renamed without changes.
File renamed without changes.
@@ -65,9 +65,11 @@ repositories {
|
|||||||
archivesBaseName = "celeritas-forge-1.7.10"
|
archivesBaseName = "celeritas-forge-1.7.10"
|
||||||
|
|
||||||
evaluationDependsOn(":common")
|
evaluationDependsOn(":common")
|
||||||
|
evaluationDependsOn(":common-shaders")
|
||||||
|
|
||||||
unimined.minecraft {
|
unimined.minecraft {
|
||||||
combineWith(project(":common"), project(":common").sourceSets.getByName("main"))
|
combineWith(project(":common"), project(":common").sourceSets.getByName("main"))
|
||||||
|
combineWith(project(":common-shaders"), project(":common-shaders").sourceSets.getByName("main"))
|
||||||
|
|
||||||
version "1.7.10"
|
version "1.7.10"
|
||||||
|
|
||||||
|
|||||||
@@ -282,6 +282,7 @@ dependencies {
|
|||||||
annotationProcessor("org.projectlombok:lombok:1.18.30")
|
annotationProcessor("org.projectlombok:lombok:1.18.30")
|
||||||
|
|
||||||
shadow(project(":common"))
|
shadow(project(":common"))
|
||||||
|
shadow(project(":common-shaders"))
|
||||||
|
|
||||||
if (shadersEnabled) {
|
if (shadersEnabled) {
|
||||||
modCompileOnly("maven.modrinth:distanthorizonsapi:3.0.0")
|
modCompileOnly("maven.modrinth:distanthorizonsapi:3.0.0")
|
||||||
|
|||||||
@@ -60,15 +60,8 @@ import java.util.zip.ZipError;
|
|||||||
import java.util.zip.ZipException;
|
import java.util.zip.ZipException;
|
||||||
|
|
||||||
public class Iris {
|
public class Iris {
|
||||||
public static final String MODID = "embeddium";
|
|
||||||
|
|
||||||
/**
|
public static final IrisLogging logger = IrisLogging.IRIS_LOGGER;
|
||||||
* The user-facing name of the mod. Moved into a constant to facilitate
|
|
||||||
* easy branding changes (for forks). You'll still need to change this
|
|
||||||
* separately in mixin plugin classes & the language files.
|
|
||||||
*/
|
|
||||||
public static final String MODNAME = "Celeritas";
|
|
||||||
public static final IrisLogging logger = new IrisLogging(MODNAME);
|
|
||||||
private static final Map<String, String> shaderPackOptionQueue = new HashMap<>();
|
private static final Map<String, String> shaderPackOptionQueue = new HashMap<>();
|
||||||
// Change this for snapshots!
|
// Change this for snapshots!
|
||||||
private static final String backupVersionNumber = "1.20.3";
|
private static final String backupVersionNumber = "1.20.3";
|
||||||
@@ -159,7 +152,7 @@ public class Iris {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error while reloading Shaders for " + MODNAME + "!", e);
|
logger.error("Error while reloading Shaders for " + IrisConstants.MODNAME + "!", e);
|
||||||
|
|
||||||
if (minecraft.player != null) {
|
if (minecraft.player != null) {
|
||||||
minecraft.player.displayClientMessage(Component.translatable("iris.shaders.reloaded.failure", Throwables.getRootCause(e).getMessage()).withStyle(ChatFormatting.RED), false);
|
minecraft.player.displayClientMessage(Component.translatable("iris.shaders.reloaded.failure", Throwables.getRootCause(e).getMessage()).withStyle(ChatFormatting.RED), false);
|
||||||
@@ -618,7 +611,7 @@ public class Iris {
|
|||||||
try {
|
try {
|
||||||
reload();
|
reload();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.error("Error while reloading Shaders for " + MODNAME + "!", e);
|
logger.error("Error while reloading Shaders for " + IrisConstants.MODNAME + "!", e);
|
||||||
|
|
||||||
if (Minecraft.getInstance().player != null) {
|
if (Minecraft.getInstance().player != null) {
|
||||||
Minecraft.getInstance().player.displayClientMessage(Component.translatable("iris.shaders.reloaded.failure", Throwables.getRootCause(e).getMessage()).withStyle(ChatFormatting.RED), false);
|
Minecraft.getInstance().player.displayClientMessage(Component.translatable("iris.shaders.reloaded.failure", Throwables.getRootCause(e).getMessage()).withStyle(ChatFormatting.RED), false);
|
||||||
@@ -742,7 +735,7 @@ public class Iris {
|
|||||||
logger.warn("", e);
|
logger.warn("", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
irisConfig = new IrisConfig(PlatformUtil.getConfigDir().resolve(MODID + "-shaders.properties"));
|
irisConfig = new IrisConfig(PlatformUtil.getConfigDir().resolve(IrisConstants.MODID + "-shaders.properties"));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
irisConfig.initialize();
|
irisConfig.initialize();
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package net.irisshaders.iris.gui.screen;
|
|||||||
|
|
||||||
import com.mojang.blaze3d.platform.InputConstants;
|
import com.mojang.blaze3d.platform.InputConstants;
|
||||||
import net.irisshaders.iris.Iris;
|
import net.irisshaders.iris.Iris;
|
||||||
|
import net.irisshaders.iris.IrisConstants;
|
||||||
import net.irisshaders.iris.api.v0.IrisApi;
|
import net.irisshaders.iris.api.v0.IrisApi;
|
||||||
import net.irisshaders.iris.gui.GuiUtil;
|
import net.irisshaders.iris.gui.GuiUtil;
|
||||||
import net.irisshaders.iris.gui.NavigationController;
|
import net.irisshaders.iris.gui.NavigationController;
|
||||||
@@ -32,7 +33,6 @@ import java.io.InputStream;
|
|||||||
import java.nio.file.FileAlreadyExistsException;
|
import java.nio.file.FileAlreadyExistsException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.time.Duration;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@@ -41,7 +41,6 @@ import java.util.Optional;
|
|||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
public class ShaderPackScreen extends Screen implements HudHideable {
|
public class ShaderPackScreen extends Screen implements HudHideable {
|
||||||
/**
|
/**
|
||||||
@@ -79,7 +78,7 @@ public class ShaderPackScreen extends Screen implements HudHideable {
|
|||||||
|
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
|
|
||||||
String irisName = Iris.MODNAME + " " + Iris.getVersion();
|
String irisName = IrisConstants.MODNAME + " " + Iris.getVersion();
|
||||||
|
|
||||||
if (PlatformUtil.isDevelopmentEnvironment()) {
|
if (PlatformUtil.isDevelopmentEnvironment()) {
|
||||||
this.developmentComponent = Component.literal("Development Environment").withStyle(ChatFormatting.GOLD);
|
this.developmentComponent = Component.literal("Development Environment").withStyle(ChatFormatting.GOLD);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
|||||||
import it.unimi.dsi.fastutil.longs.Long2ObjectMaps;
|
import it.unimi.dsi.fastutil.longs.Long2ObjectMaps;
|
||||||
import net.irisshaders.batchedentityrendering.impl.*;
|
import net.irisshaders.batchedentityrendering.impl.*;
|
||||||
import net.irisshaders.iris.Iris;
|
import net.irisshaders.iris.Iris;
|
||||||
|
import net.irisshaders.iris.IrisConstants;
|
||||||
import net.irisshaders.iris.compat.dh.DHCompat;
|
import net.irisshaders.iris.compat.dh.DHCompat;
|
||||||
import net.irisshaders.iris.gl.IrisRenderSystem;
|
import net.irisshaders.iris.gl.IrisRenderSystem;
|
||||||
import net.irisshaders.iris.gui.option.IrisVideoSettings;
|
import net.irisshaders.iris.gui.option.IrisVideoSettings;
|
||||||
@@ -710,26 +711,26 @@ public class ShadowRenderer {
|
|||||||
|
|
||||||
public void addDebugText(List<String> messages) {
|
public void addDebugText(List<String> messages) {
|
||||||
if (IrisVideoSettings.getOverriddenShadowDistance(IrisVideoSettings.shadowDistance) == 0) {
|
if (IrisVideoSettings.getOverriddenShadowDistance(IrisVideoSettings.shadowDistance) == 0) {
|
||||||
messages.add("[" + Iris.MODNAME + "] Shadow Maps: off, shadow distance 0");
|
messages.add("[" + IrisConstants.MODNAME + "] Shadow Maps: off, shadow distance 0");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Iris.getIrisConfig().areDebugOptionsEnabled()) {
|
if (Iris.getIrisConfig().areDebugOptionsEnabled()) {
|
||||||
messages.add("[" + Iris.MODNAME + "] Shadow Maps: " + debugStringOverall);
|
messages.add("[" + IrisConstants.MODNAME + "] Shadow Maps: " + debugStringOverall);
|
||||||
messages.add("[" + Iris.MODNAME + "] Shadow Distance Terrain: " + terrainFrustumHolder.getDistanceInfo() + " Entity: " + entityFrustumHolder.getDistanceInfo());
|
messages.add("[" + IrisConstants.MODNAME + "] Shadow Distance Terrain: " + terrainFrustumHolder.getDistanceInfo() + " Entity: " + entityFrustumHolder.getDistanceInfo());
|
||||||
messages.add("[" + Iris.MODNAME + "] Shadow Culling Terrain: " + terrainFrustumHolder.getCullingInfo() + " Entity: " + entityFrustumHolder.getCullingInfo());
|
messages.add("[" + IrisConstants.MODNAME + "] Shadow Culling Terrain: " + terrainFrustumHolder.getCullingInfo() + " Entity: " + entityFrustumHolder.getCullingInfo());
|
||||||
messages.add("[" + Iris.MODNAME + "] Shadow Terrain: " + debugStringTerrain
|
messages.add("[" + IrisConstants.MODNAME + "] Shadow Terrain: " + debugStringTerrain
|
||||||
+ (shouldRenderTerrain ? "" : " (no terrain) ") + (shouldRenderTranslucent ? "" : "(no translucent)"));
|
+ (shouldRenderTerrain ? "" : " (no terrain) ") + (shouldRenderTranslucent ? "" : "(no translucent)"));
|
||||||
messages.add("[" + Iris.MODNAME + "] Shadow Entities: " + getEntitiesDebugString());
|
messages.add("[" + IrisConstants.MODNAME + "] Shadow Entities: " + getEntitiesDebugString());
|
||||||
messages.add("[" + Iris.MODNAME + "] Shadow Block Entities: " + getBlockEntitiesDebugString());
|
messages.add("[" + IrisConstants.MODNAME + "] Shadow Block Entities: " + getBlockEntitiesDebugString());
|
||||||
|
|
||||||
if (buffers instanceof DrawCallTrackingRenderBuffers drawCallTracker && (shouldRenderEntities || shouldRenderPlayer)) {
|
if (buffers instanceof DrawCallTrackingRenderBuffers drawCallTracker && (shouldRenderEntities || shouldRenderPlayer)) {
|
||||||
messages.add("[" + Iris.MODNAME + "] Shadow Entity Batching: " + BatchingDebugMessageHelper.getDebugMessage(drawCallTracker));
|
messages.add("[" + IrisConstants.MODNAME + "] Shadow Entity Batching: " + BatchingDebugMessageHelper.getDebugMessage(drawCallTracker));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
messages.add("[" + Iris.MODNAME + "] Shadow info: " + debugStringTerrain);
|
messages.add("[" + IrisConstants.MODNAME + "] Shadow info: " + debugStringTerrain);
|
||||||
messages.add("[" + Iris.MODNAME + "] E: " + renderedShadowEntities);
|
messages.add("[" + IrisConstants.MODNAME + "] E: " + renderedShadowEntities);
|
||||||
messages.add("[" + Iris.MODNAME + "] BE: " + renderedShadowBlockEntities);
|
messages.add("[" + IrisConstants.MODNAME + "] BE: " + renderedShadowBlockEntities);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user