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
Collaborator
No description provided.
mitchej123 added 17 commits 2025-03-28 11:11:05 -04:00
mitchej123 requested review from embeddedt 2025-03-28 11:11:11 -04:00
@@ -0,0 +8,4 @@
*
* @return a valid {@code VertexFormat} instance
*/
// VertexFormat getUnderlyingVertexFormat();
Owner

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.
embeddedt marked this conversation as resolved
@@ -0,0 +72,4 @@
}
public void dispatch(float width, float height) {
if (!MINECRAFT_SHIM.irisAllowConcurrentUpdate()) {
Owner

Weird... making a note to look at later.

Weird... making a note to look at later.
embeddedt marked this conversation as resolved
@@ -0,0 +29,4 @@
ShaderWorkarounds.safeShaderSource(handle, src);
GL_STATE_MANAGER.glCompileShader(handle);
// GLDebug.nameObject(KHRDebug.GL_SHADER, handle, name + "(" + type.name().toLowerCase(Locale.ROOT) + ")");
Owner

Why is this commented out.. isn't GLDebug common?

Why is this commented out.. isn't `GLDebug` common?
embeddedt marked this conversation as resolved
@@ -0,0 +84,4 @@
* @param a The alpha-component in linear RGB space (0 to 255)
*/
public static int linearToSrgb(float r, float g, float b, int a) {
return ABGR32.color(a, linearToSrgb(b), linearToSrgb(g), linearToSrgb(r));
Owner

Use Celeritas' ColorABGR or ColorARGB instead of making a service.

Use Celeritas' `ColorABGR` or `ColorARGB` instead of making a service.
embeddedt marked this conversation as resolved
@@ -0,0 +2,4 @@
import net.irisshaders.iris.gl.IrisRenderSystem;
import net.irisshaders.iris.texture.mipmap.CustomMipmapGenerator;
import net.irisshaders.iris.texture.prb.PBRType;
Owner

Um..

Um..
embeddedt marked this conversation as resolved
@@ -0,0 +45,4 @@
// Apply the fixed -90.0F degrees rotation to mirror the same transformation in renderSky.
// But, notably, skip the rotation by the skyAngle.
MINECRAFT_SHIM.applyRotationYP(preCelestial, -90.0F);
Owner

We should probably just make our own helper that generates quaternions for a given axis, rather than trying to reuse MC's.

We should probably just make our own helper that generates quaternions for a given axis, rather than trying to reuse MC's.
@@ -0,0 +2,4 @@
import java.util.ServiceLoader;
public interface ABGR32Service {
Owner

As mentioned in an earlier comment, this is redundant, we have some common color utilities already.

As mentioned in an earlier comment, this is redundant, we have some common color utilities already.
embeddedt marked this conversation as resolved
embeddedt added 4 commits 2025-03-29 19:57:14 -04:00
embeddedt added 1 commit 2025-03-29 19:59:27 -04:00
embeddedt added 2 commits 2025-03-29 20:26:07 -04:00
embeddedt merged commit 460ea7630a into stonecutter 2025-03-31 19:52:28 -04:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: embeddedt/celeritas#10