Common and version specific shader packages #10

Merged
embeddedt merged 24 commits from mitchej123/celeritas:common-shaders-and-enhancements into stonecutter 2025-03-31 19:52:28 -04:00
43 changed files with 80 additions and 9 deletions
Showing only changes of commit 6d47119fb1 - Show all commits

No files matched your search

+67
View File
@@ -0,0 +1,67 @@
plugins {
id 'java-library'
id 'maven-publish'
}
group = "org.embeddedt.celeritas-shaders"
version = rootProject.version
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
}
repositories {
mavenCentral()
}
dependencies {
def lwjglVersion = "3.3.1"
compileOnly "org.lwjgl:lwjgl:${lwjglVersion}"
compileOnly "org.lwjgl:lwjgl-opengl:${lwjglVersion}"
compileOnly "org.joml:joml:1.10.5"
compileOnly "it.unimi.dsi:fastutil:7.1.0"
compileOnly "org.apache.logging.log4j:log4j-api:2.0-beta9"
compileOnly "org.jetbrains:annotations:24.1.0"
compileOnly("org.projectlombok:lombok:1.18.30")
annotationProcessor("org.projectlombok:lombok:1.18.30")
compileOnly("com.google.guava:guava:31.1-jre")
compileOnly("org.ow2.asm:asm:9.6")
compileOnly("org.ow2.asm:asm-tree:9.6")
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId 'celeritas-common'
from components.java
}
}
repositories {
maven {
name = "taumcRepository"
url = uri("https://maven.taumc.org/releases")
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_SECRET")
}
authentication {
basic(BasicAuthentication)
}
}
}
}
tasks.withType(Jar).configureEach {
from(rootProject.file("COPYING"))
from(rootProject.file("COPYING.LESSER"))
}
jar {
manifest {
attributes([
"Lwjgl3ify-Aware": "true"
])
}
}
@@ -1,8 +1,8 @@
package net.irisshaders.iris.api.v0;
import net.irisshaders.iris.apiimpl.IrisApiV0Impl;
import java.nio.ByteBuffer;
import java.util.ServiceLoader;
import java.util.function.IntFunction;
/**
@@ -12,11 +12,13 @@ import java.util.function.IntFunction;
* To access the API, use {@link #getInstance()}.
*/
public interface IrisApi {
IrisApi INSTANCE = ServiceLoader.load(IrisApi.class).findFirst().orElseThrow();
/**
* @since API v0.0
*/
static IrisApi getInstance() {
return IrisApiV0Impl.INSTANCE;
return INSTANCE;
}
/**
@@ -1,7 +1,5 @@
package net.irisshaders.iris.api.v0;
import com.mojang.blaze3d.vertex.VertexFormat;
import java.nio.ByteBuffer;
public interface IrisTextVertexSink {
@@ -10,7 +8,7 @@ public interface IrisTextVertexSink {
*
* @return a valid {@code VertexFormat} instance
*/
VertexFormat getUnderlyingVertexFormat();
// VertexFormat getUnderlyingVertexFormat();
embeddedt marked this conversation as resolved Outdated
Outdated
Review

This API needs to be kept; I believe there is a single mod using it on modern (ComputerCraft) and I don't want to break it.

This API needs to be kept; I believe there is a single mod using it on modern (ComputerCraft) and I don't want to break it.
/**
* Gets the underlying buffer used for rendering text in the current sink.
File renamed without changes.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

+2
View File
@@ -185,9 +185,11 @@ if (shadersEnabled) {
}
evaluationDependsOn(":common")
evaluationDependsOn(":common-shaders")
unimined.minecraft {
combineWith(project(":common"), project(":common").sourceSets.getByName("main"))
combineWith(project(":common-shaders"), project(":common-shaders").sourceSets.getByName("main"))
version ModLoader.getMinecraftVersion(project)
@@ -0,0 +1 @@
net.irisshaders.iris.apiimpl.IrisApiV0Impl
@@ -33,10 +33,10 @@ public class IrisTextVertexSinkImpl implements IrisTextVertexSink {
this.elementOffset = MemoryUtil.memAddress(this.buffer);
}
@Override
public VertexFormat getUnderlyingVertexFormat() {
return format;
}
// @Override
// public VertexFormat getUnderlyingVertexFormat() {
// return format;
// }
@Override
public ByteBuffer getUnderlyingByteBuffer() {
+1
View File
@@ -48,6 +48,7 @@ plugins {
rootProject.name = "celeritas"
include("common")
include("common-shaders")
if(file("forge1710").exists()) {
include("forge1710")