-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compatible with sodium:mc1.20.1-0.5.1, only for fabric, rubidium is n…
…ot supported at this commit
- Loading branch information
Showing
8 changed files
with
55 additions
and
13 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
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
13 changes: 13 additions & 0 deletions
13
.../main/java/com/lowdragmc/shimmer/fabric/core/mixins/iris/ShaderStorageBufferAccessor.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,13 @@ | ||
package com.lowdragmc.shimmer.fabric.core.mixins.iris; | ||
|
||
import net.coderbot.iris.gl.buffer.ShaderStorageBuffer; | ||
import net.coderbot.iris.gl.buffer.ShaderStorageInfo; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
@Mixin(ShaderStorageBuffer.class) | ||
public interface ShaderStorageBufferAccessor { | ||
@Invoker void callDestroy(); | ||
@Accessor ShaderStorageInfo getInfo(); | ||
} |
26 changes: 26 additions & 0 deletions
26
...rc/main/java/com/lowdragmc/shimmer/fabric/core/mixins/sodium/CompactChunkVertexMixin.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,26 @@ | ||
package com.lowdragmc.shimmer.fabric.core.mixins.sodium; | ||
|
||
import me.jellysquid.mods.sodium.client.render.chunk.terrain.material.Material; | ||
import me.jellysquid.mods.sodium.client.render.chunk.vertex.format.ChunkVertexEncoder; | ||
import me.jellysquid.mods.sodium.client.render.chunk.vertex.format.impl.CompactChunkVertex; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Shadow; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
@Mixin(value = CompactChunkVertex.class, remap = false) | ||
public abstract class CompactChunkVertexMixin { | ||
@Shadow | ||
private static int encodeDrawParameters(Material par1, int par2) { | ||
throw new RuntimeException(); | ||
} | ||
|
||
@Redirect(method = "lambda$getEncoder$0", at = @At(value = "INVOKE", target = "Lme/jellysquid/mods/sodium/client/render/chunk/vertex/format/impl/CompactChunkVertex;encodeDrawParameters(Lme/jellysquid/mods/sodium/client/render/chunk/terrain/material/Material;I)I")) | ||
private static int injectMaterialForBloom(Material material, int i, long ptr, Material material1, ChunkVertexEncoder.Vertex vertex, int sectionIndex) { | ||
var origin = encodeDrawParameters(material,i); | ||
if ((vertex.light & 0x100) != 0) { | ||
origin |= (0x01 << 4); | ||
} | ||
return origin; | ||
} | ||
} |
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