mitchej123/celeritas:common-shaders-and-enhancements
stonecutter
* More readable * Add some debugState methods from Angelica
* Start by moving some resources & API over
* Add MinecraftVersionShimService
* Add DHCompatService
* Add PlatformUtilService * Add IrisCommon to start breaking up Iris
* MC Resource, Native Image, AbstractTexture, ABGR32
@@ -0,0 +8,4 @@
*
* @return a valid {@code VertexFormat} instance
*/
// VertexFormat getUnderlyingVertexFormat();
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.
@@ -0,0 +72,4 @@
}
public void dispatch(float width, float height) {
if (!MINECRAFT_SHIM.irisAllowConcurrentUpdate()) {
Weird... making a note to look at later.
@@ -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) + ")");
Why is this commented out.. isn't GLDebug common?
GLDebug
@@ -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));
Use Celeritas' ColorABGR or ColorARGB instead of making a service.
ColorABGR
ColorARGB
@@ -0,0 +2,4 @@
import net.irisshaders.iris.gl.IrisRenderSystem;
import net.irisshaders.iris.texture.mipmap.CustomMipmapGenerator;
import net.irisshaders.iris.texture.prb.PBRType;
Um..
@@ -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);
We should probably just make our own helper that generates quaternions for a given axis, rather than trying to reuse MC's.
import java.util.ServiceLoader;
public interface ABGR32Service {
As mentioned in an earlier comment, this is redundant, we have some common color utilities already.
No dependencies set.
The note is not visible to the blocked user.
@@ -0,0 +8,4 @@** @return a valid {@code VertexFormat} instance*/// VertexFormat getUnderlyingVertexFormat();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.
@@ -0,0 +72,4 @@}public void dispatch(float width, float height) {if (!MINECRAFT_SHIM.irisAllowConcurrentUpdate()) {Weird... making a note to look at later.
@@ -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) + ")");Why is this commented out.. isn't
GLDebugcommon?@@ -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));Use Celeritas'
ColorABGRorColorARGBinstead of making a service.@@ -0,0 +2,4 @@import net.irisshaders.iris.gl.IrisRenderSystem;import net.irisshaders.iris.texture.mipmap.CustomMipmapGenerator;import net.irisshaders.iris.texture.prb.PBRType;Um..
@@ -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);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 {As mentioned in an earlier comment, this is redundant, we have some common color utilities already.