Skip to content

Commit

Permalink
Merge branch '1.20.x' into BaseInstanceGPUArgs3
Browse files Browse the repository at this point in the history
  • Loading branch information
thr3343 committed Dec 22, 2023
2 parents e775718 + bd462e7 commit 5cef229
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 19 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ dependencies {
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
//modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
}

processResources {
Expand Down
18 changes: 9 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
org.gradle.jvmargs=-Xmx3G

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20.2
yarn_mappings=1.20.2+build.1
loader_version=0.14.22
# check these on https://fabricmc.net/develop
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.3
loader_version=0.15.3

#Fabric api
fabric_version=0.89.0+1.20.2
#Fabric api
fabric_version=0.91.2+1.20.4

# Mod Properties
mod_version = 0.3.6_dev
maven_group = net.vulkanmod
archives_base_name = VulkanMod_1.20.2
mod_version = 0.3.8
maven_group = net.vulkanmod
archives_base_name = VulkanMod_1.20.4
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package net.vulkanmod.mixin.render;

import com.mojang.blaze3d.pipeline.RenderCall;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.PoseStack;
Expand Down Expand Up @@ -71,6 +72,9 @@ public static void _setShaderTexture(int i, int id) {
GlTexture glTexture = GlTexture.getTexture(id);
VulkanImage vulkanImage = glTexture != null ? glTexture.getVulkanImage() : null;

if(vulkanImage == null)
return;

VTextureSelector.bindTexture(i, vulkanImage);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ protected SingleQuadParticleM(ClientLevel clientLevel, double d, double e, doubl
*/
@Overwrite
public void render(VertexConsumer vertexConsumer, Camera camera, float f) {
float xOffset = (float)(Mth.lerp(f, this.xo, this.x));
float yOffset = (float)(Mth.lerp(f, this.yo, this.y));
float zOffset = (float)(Mth.lerp(f, this.zo, this.z));
double lx = (Mth.lerp(f, this.xo, this.x));
double ly = (Mth.lerp(f, this.yo, this.y));
double lz = (Mth.lerp(f, this.zo, this.z));

if(cull(WorldRenderer.getInstance(), xOffset, yOffset, zOffset))
if(cull(WorldRenderer.getInstance(), (float) lx, (float) ly, (float) lz))
return;

Vec3 vec3 = camera.getPosition();
xOffset -= (float) vec3.x();
yOffset -= (float) vec3.y();
zOffset -= (float) vec3.z();
float offsetX = (float) (lx - vec3.x());
float offsetY = (float) (ly - vec3.y());
float offsetZ = (float) (lz - vec3.z());

Quaternionf quaternionf;
if (this.roll != 0.0F) {
Expand All @@ -71,7 +71,7 @@ public void render(VertexConsumer vertexConsumer, Camera camera, float f) {
Vector3f vector3f = vector3fs[k];
vector3f.rotate(quaternionf);
vector3f.mul(j);
vector3f.add(xOffset, yOffset, zOffset);
vector3f.add(offsetX, offsetY, offsetZ);
}

float u0 = this.getU0();
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "vulkanmod",
"version": "0.3.6_dev",
"version": "0.3.8",

"name": "VulkanMod",
"description": "Bring Vulkan to Minecraft!",
Expand Down

0 comments on commit 5cef229

Please sign in to comment.