Skip to content

Commit

Permalink
support iris 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RogoShum committed May 5, 2024
1 parent 3772a62 commit cb8a7fe
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 41 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ dependencies {
include "me.zeroeightsix:fiber:${project.fiber_version}"

modImplementation "maven.modrinth:sodium:mc1.20.1-0.5.8"
modImplementation 'maven.modrinth:iris:1.6.17+1.20.1'
modImplementation 'maven.modrinth:iris:1.7.0+1.20.1'

implementation("org.anarres:jcpp:1.4.14")
modImplementation("io.github.douira:glsl-transformer:2.0.0-pre13")

modImplementation('maven.modrinth:nvidium:0.2.6-beta')
//architectury
modImplementation('maven.modrinth:lhGA9TYQ:WbL7MStR')
//modImplementation('maven.modrinth:lhGA9TYQ:WbL7MStR')
}

processResources {
Expand Down
5 changes: 3 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ org.gradle.parallel=true
# check these on https://fabricmc.net/develop
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10
loader_version=0.15.9
loader_version=0.15.10

# Mod Properties
mod_version=0.5.8
mod_version=0.5.9
maven_group=rogo.renderingculling
archives_base_name=BruteForceRenderingCulling-fabric-1.20.1
mod_id=brute_force_rendering_culling

#Fabric api
fabric_version=0.92.1+1.20.1
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/rogo/renderingculling/gui/ConfigScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ public void renderBackground(GuiGraphics guiGraphics) {
.color(bgColor, bgColor, bgColor, bgAlpha)
.uv(u(right - 1), v(top - 1)).endVertex();
RenderSystem.setShaderTexture(0, Minecraft.getInstance().getMainRenderTarget().getColorTextureId());
RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
BufferUploader.drawWithShader(bufferbuilder.end());

bgAlpha = 1.0f;
RenderSystem.setShader(GameRenderer::getPositionColorShader);
bufferbuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR);
Expand All @@ -87,7 +90,7 @@ public void renderBackground(GuiGraphics guiGraphics) {
.color(bgColor, bgColor, bgColor, bgAlpha).endVertex();
bufferbuilder.vertex(right, top, 0.0D)
.color(bgColor, bgColor, bgColor, bgAlpha).endVertex();
RenderSystem.enableBlend();

RenderSystem.blendFunc(GlStateManager.SourceFactor.ONE_MINUS_DST_COLOR, GlStateManager.DestFactor.ZERO);
BufferUploader.drawWithShader(bufferbuilder.end());
RenderSystem.defaultBlendFunc();
Expand Down
25 changes: 0 additions & 25 deletions src/main/java/rogo/renderingculling/mixin/MixinGameRenderer.java

This file was deleted.

14 changes: 7 additions & 7 deletions src/main/java/rogo/renderingculling/util/IrisLoaderImpl.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package rogo.renderingculling.util;

import net.coderbot.iris.Iris;
import net.coderbot.iris.gl.framebuffer.GlFramebuffer;
import net.coderbot.iris.pipeline.SodiumTerrainPipeline;
import net.coderbot.iris.pipeline.WorldRenderingPipeline;
import net.coderbot.iris.pipeline.newshader.NewWorldRenderingPipeline;
import net.irisshaders.iris.Iris;
import net.irisshaders.iris.api.v0.IrisApi;
import net.irisshaders.iris.gl.framebuffer.GlFramebuffer;
import net.irisshaders.iris.pipeline.IrisRenderingPipeline;
import net.irisshaders.iris.pipeline.SodiumTerrainPipeline;
import net.irisshaders.iris.pipeline.WorldRenderingPipeline;
import net.minecraft.client.Minecraft;

import java.lang.reflect.Field;
Expand All @@ -18,8 +18,8 @@ public int getFrameBufferID() {
WorldRenderingPipeline pipeline = Iris.getPipelineManager().getPipeline().get();
try {
Field f = null;
if (pipeline instanceof NewWorldRenderingPipeline) {
f = NewWorldRenderingPipeline.class.getDeclaredField("sodiumTerrainPipeline");
if (pipeline instanceof IrisRenderingPipeline) {
f = IrisRenderingPipeline.class.getDeclaredField("sodiumTerrainPipeline");
}
if (f != null) {
f.setAccessible(true);
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "brute_force_rendering_culling",
"version": "0.5.8",
"version": "0.5.9",
"name": "Brute force Rendering Culling",
"description": "",
"authors": [
Expand All @@ -27,8 +27,8 @@
"java": ">=17",
"fabric-api": "*"
},
"suggests": {
"another-mod": "*"
"breaks": {
"iris": "<1.7.0"
},
"accessWidener" : "brute_force_rendering_culling.accesswidener"
}
1 change: 0 additions & 1 deletion src/main/resources/mixins.bfrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"MixinBlockEntityRender",
"MixinEntityRender",
"MixinFrustum",
"MixinGameRenderer",
"MixinInactiveProfiler",
"MixinLevelRender",
"MixinLevelRender$AccessorViewArea",
Expand Down

0 comments on commit cb8a7fe

Please sign in to comment.