-
-
Notifications
You must be signed in to change notification settings - Fork 641
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
93 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
package net.irisshaders.iris; | ||
|
||
public class NeoLambdas { | ||
public static final String NEO_RENDER_SKY = "lambda$addSkyPass$12"; | ||
public static final String NEO_RENDER_SKY = "lambda$addSkyPass$10"; | ||
public static final String NEO_RENDER_MAIN_PASS = "lambda$addMainPass$2"; | ||
public static final String NEO_RENDER_WEATHER = "lambda$addWeatherPass$7"; | ||
public static final String NEO_RENDER_CLOUDS = "lambda$addCloudsPass$6"; | ||
public static final String NEO_RENDER_WEATHER = "lambda$addWeatherPass$5."; | ||
public static final String NEO_RENDER_CLOUDS = "lambda$addCloudsPass$4"; | ||
public static final String NEO_PARTICLE = "lambda$static$26"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
common/src/main/java/net/irisshaders/iris/mixin/MixinRenderType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package net.irisshaders.iris.mixin; | ||
|
||
import net.irisshaders.iris.NeoLambdas; | ||
import net.irisshaders.iris.pipeline.programs.ShaderAccess; | ||
import net.minecraft.client.renderer.RenderStateShard; | ||
import net.minecraft.client.renderer.RenderType; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Unique; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
@Mixin(RenderType.class) | ||
public class MixinRenderType { | ||
@Unique | ||
private static final RenderStateShard.ShaderStateShard TRANSLUCENT_PARTICLE_SHADER = new RenderStateShard.ShaderStateShard(ShaderAccess.TRANSLUCENT_PARTICLE_SHADER); | ||
|
||
@Redirect(method = {"method_65225", NeoLambdas.NEO_PARTICLE }, require = 1, at = @At(value = "FIELD", target = "Lnet/minecraft/client/renderer/RenderType;PARTICLE_SHADER:Lnet/minecraft/client/renderer/RenderStateShard$ShaderStateShard;")) | ||
private static RenderStateShard.ShaderStateShard getTranslucentParticleShader() { | ||
return TRANSLUCENT_PARTICLE_SHADER; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
common/src/main/java/net/irisshaders/iris/mixin/MixinTextureUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package net.irisshaders.iris.mixin; | ||
|
||
import com.mojang.blaze3d.platform.TextureUtil; | ||
import net.irisshaders.iris.gl.IrisRenderSystem; | ||
import org.lwjgl.opengl.GL46C; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | ||
|
||
@Mixin(TextureUtil.class) | ||
public class MixinTextureUtil { | ||
@Inject(method = "generateTextureId", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;assertOnRenderThreadOrInit()V", shift = At.Shift.AFTER), cancellable = true) | ||
private static void generateTextureId(CallbackInfoReturnable<Integer> cir) { | ||
cir.setReturnValue(IrisRenderSystem.createTexture(GL46C.GL_TEXTURE_2D)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters