Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwrite TextureAtlasSprite#uvShrinkRatio #2746

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package net.caffeinemc.mods.sodium.mixin.core.model;

import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;

@Mixin(TextureAtlasSprite.class)
public class TextureAtlasSpriteMixin {
@Overwrite
public float uvShrinkRatio() {
// Vanilla tries to apply a bias to texture coordinates to avoid texture bleeding (see FaceBakery#bakeQuad).
// This is counterproductive with Sodium's terrain rendering, since the bias is applied in the shader instead.
// Overwrite this method instead of adjusting its return value in FaceBakery as other mods may use it to
// manually apply the bias.
return 0.0f;
}
}
2 changes: 1 addition & 1 deletion common/src/main/resources/sodium.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"core.gui.LevelLoadStatusManagerMixin",
"core.model.colors.BlockColorsMixin",
"core.model.colors.ItemColorsMixin",
"core.model.FaceBakeryMixin",
"core.model.TextureAtlasSpriteMixin",
"core.render.BlockEntityTypeMixin",
"core.render.TextureAtlasMixin",
"core.render.VertexFormatMixin",
Expand Down
Loading