Skip to content

Commit 7f3d19f

Browse files
committed
Now compiles
1 parent 1051549 commit 7f3d19f

File tree

7 files changed

+22
-58
lines changed

7 files changed

+22
-58
lines changed

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ loom.platform = forge
99
forge_version=47.1.84
1010

1111
# Mod Properties
12-
mod_version = 1.6.13
12+
mod_version = 1.6.15
1313
maven_group = net.coderbot
1414
archives_base_name = oculus
1515

1616
# Dependencies
17-
embeddium_version=0.2.14-git.dbe9f77+mc1.20.1
17+
embeddium_version=0.3.0-git.a736e41+mc1.20.1

src/main/java/net/coderbot/iris/gui/OldImageButton.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package net.coderbot.iris.gui;
22

3-
import net.fabricmc.api.EnvType;
4-
import net.fabricmc.api.Environment;
53
import net.minecraft.client.gui.GuiGraphics;
64
import net.minecraft.client.gui.components.Button;
75
import net.minecraft.network.chat.CommonComponents;
86
import net.minecraft.network.chat.Component;
97
import net.minecraft.resources.ResourceLocation;
8+
import net.minecraftforge.api.distmarker.Dist;
9+
import net.minecraftforge.api.distmarker.OnlyIn;
1010

11-
@Environment(EnvType.CLIENT)
11+
@OnlyIn(Dist.CLIENT)
1212
public class OldImageButton extends Button {
1313
protected final ResourceLocation resourceLocation;
1414
protected final int xTexStart;

src/main/java/net/coderbot/iris/mixin/MixinOptions_Entrypoint.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
package net.coderbot.iris.mixin;
22

33
import net.coderbot.iris.Iris;
4-
import net.minecraft.client.KeyMapping;
54
import net.minecraft.client.Options;
6-
import org.apache.commons.lang3.ArrayUtils;
7-
import org.spongepowered.asm.mixin.Final;
85
import org.spongepowered.asm.mixin.Mixin;
9-
import org.spongepowered.asm.mixin.Mutable;
10-
import org.spongepowered.asm.mixin.Shadow;
116
import org.spongepowered.asm.mixin.Unique;
127
import org.spongepowered.asm.mixin.injection.At;
138
import org.spongepowered.asm.mixin.injection.Inject;
@@ -25,6 +20,6 @@ public class MixinOptions_Entrypoint {
2520
}
2621

2722
iris$initialized = true;
28-
new Iris().onEarlyInitialize();
23+
Iris.onEarlyInitialize();
2924
}
3025
}

src/main/java/net/coderbot/iris/pipeline/newshader/ExtendedShader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ public String applyImport(boolean bl, String string) {
267267
});
268268
factory.getResource(new ResourceLocation(name.getNamespace(), name.getPath() + "_tessControl.tcs")).ifPresent(tessControl -> {
269269
try {
270-
this.tessControl = Program.compileShader(IrisProgramTypes.TESS_CONTROL, name, tessControl.open(), tessControl.sourcePackId(), new GlslPreprocessor() {
270+
this.tessControl = Program.compileShader(IrisProgramTypes.TESS_CONTROL, name.getPath(), tessControl.open(), tessControl.sourcePackId(), new GlslPreprocessor() {
271271
@Nullable
272272
@Override
273273
public String applyImport(boolean bl, String string) {
@@ -280,7 +280,7 @@ public String applyImport(boolean bl, String string) {
280280
});
281281
factory.getResource(new ResourceLocation(name.getNamespace(), name.getPath() + "_tessEval.tes")).ifPresent(tessEval -> {
282282
try {
283-
this.tessEval = Program.compileShader(IrisProgramTypes.TESS_EVAL, name, tessEval.open(), tessEval.sourcePackId(), new GlslPreprocessor() {
283+
this.tessEval = Program.compileShader(IrisProgramTypes.TESS_EVAL, name.getPath(), tessEval.open(), tessEval.sourcePackId(), new GlslPreprocessor() {
284284
@Nullable
285285
@Override
286286
public String applyImport(boolean bl, String string) {

src/main/resources/META-INF/mods.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ side = "BOTH"
3030
[[dependencies.oculus]]
3131
modId = "embeddium"
3232
mandatory = false
33-
versionRange = "[0.2.14,)"
33+
versionRange = "[0.3.0,)"
3434
ordering = "NONE"
3535
side = "CLIENT"

src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/vertex_format/entity_xhfp/EntityVertex.java

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,21 @@ public static void writeQuadVertices(VertexBufferWriter writer, PoseStack.Pose m
131131
// The packed normal vector
132132
var n = quad.getForgeNormal(i);
133133

134-
if((n & 0xFFFFFF) == 0) {
135-
n = quad.getNormal();
134+
float nx, ny, nz;
135+
136+
if((n & 0xFFFFFF) == 0) { // TODO review
137+
var n0 = quad.getLightFace().step();
138+
139+
nx = n0.x;
140+
ny = n0.y;
141+
nz = n0.z;
142+
} else {
143+
// The normal vector
144+
nx = NormI8.unpackX(n);
145+
ny = NormI8.unpackY(n);
146+
nz = NormI8.unpackZ(n);
136147
}
137148

138-
// The normal vector
139-
float nx = NormI8.unpackX(n);
140-
float ny = NormI8.unpackY(n);
141-
float nz = NormI8.unpackZ(n);
142-
143149
// The transformed normal vector
144150
nxt = MatrixHelper.transformNormalX(matNormal, nx, ny, nz);
145151
nyt = MatrixHelper.transformNormalY(matNormal, nx, ny, nz);

src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/fast_render/MixinCube.java

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)