Skip to content

Commit

Permalink
Now compiles
Browse files Browse the repository at this point in the history
  • Loading branch information
dima-dencep committed Feb 1, 2024
1 parent 1051549 commit 7f3d19f
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 58 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ loom.platform = forge
forge_version=47.1.84

# Mod Properties
mod_version = 1.6.13
mod_version = 1.6.15
maven_group = net.coderbot
archives_base_name = oculus

# Dependencies
embeddium_version=0.2.14-git.dbe9f77+mc1.20.1
embeddium_version=0.3.0-git.a736e41+mc1.20.1
6 changes: 3 additions & 3 deletions src/main/java/net/coderbot/iris/gui/OldImageButton.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package net.coderbot.iris.gui;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.client.gui.components.Button;
import net.minecraft.network.chat.CommonComponents;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;

@Environment(EnvType.CLIENT)
@OnlyIn(Dist.CLIENT)
public class OldImageButton extends Button {
protected final ResourceLocation resourceLocation;
protected final int xTexStart;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
package net.coderbot.iris.mixin;

import net.coderbot.iris.Iris;
import net.minecraft.client.KeyMapping;
import net.minecraft.client.Options;
import org.apache.commons.lang3.ArrayUtils;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
Expand All @@ -25,6 +20,6 @@ public class MixinOptions_Entrypoint {
}

iris$initialized = true;
new Iris().onEarlyInitialize();
Iris.onEarlyInitialize();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public String applyImport(boolean bl, String string) {
});
factory.getResource(new ResourceLocation(name.getNamespace(), name.getPath() + "_tessControl.tcs")).ifPresent(tessControl -> {
try {
this.tessControl = Program.compileShader(IrisProgramTypes.TESS_CONTROL, name, tessControl.open(), tessControl.sourcePackId(), new GlslPreprocessor() {
this.tessControl = Program.compileShader(IrisProgramTypes.TESS_CONTROL, name.getPath(), tessControl.open(), tessControl.sourcePackId(), new GlslPreprocessor() {
@Nullable
@Override
public String applyImport(boolean bl, String string) {
Expand All @@ -280,7 +280,7 @@ public String applyImport(boolean bl, String string) {
});
factory.getResource(new ResourceLocation(name.getNamespace(), name.getPath() + "_tessEval.tes")).ifPresent(tessEval -> {
try {
this.tessEval = Program.compileShader(IrisProgramTypes.TESS_EVAL, name, tessEval.open(), tessEval.sourcePackId(), new GlslPreprocessor() {
this.tessEval = Program.compileShader(IrisProgramTypes.TESS_EVAL, name.getPath(), tessEval.open(), tessEval.sourcePackId(), new GlslPreprocessor() {
@Nullable
@Override
public String applyImport(boolean bl, String string) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ side = "BOTH"
[[dependencies.oculus]]
modId = "embeddium"
mandatory = false
versionRange = "[0.2.14,)"
versionRange = "[0.3.0,)"
ordering = "NONE"
side = "CLIENT"
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,21 @@ public static void writeQuadVertices(VertexBufferWriter writer, PoseStack.Pose m
// The packed normal vector
var n = quad.getForgeNormal(i);

if((n & 0xFFFFFF) == 0) {
n = quad.getNormal();
float nx, ny, nz;

if((n & 0xFFFFFF) == 0) { // TODO review
var n0 = quad.getLightFace().step();

nx = n0.x;
ny = n0.y;
nz = n0.z;
} else {
// The normal vector
nx = NormI8.unpackX(n);
ny = NormI8.unpackY(n);
nz = NormI8.unpackZ(n);
}

// The normal vector
float nx = NormI8.unpackX(n);
float ny = NormI8.unpackY(n);
float nz = NormI8.unpackZ(n);

// The transformed normal vector
nxt = MatrixHelper.transformNormalX(matNormal, nx, ny, nz);
nyt = MatrixHelper.transformNormalY(matNormal, nx, ny, nz);
Expand Down

This file was deleted.

0 comments on commit 7f3d19f

Please sign in to comment.