Initial commit for gui-item-supersampling (#2299)

This commit is contained in:
Eclipse-Sol authored and GitHub committed 2026-10-25 13:10:15 -07:00
1 parent 34ed1d101b
commit 17a2ed7f37
22 files changed
+562 -4

No files matched your search

@@ -68,6 +68,10 @@ public enum Mixins implements IMixins {
, "angelica.optimizations.MixinRenderBiped_ArmorResource"
, "angelica.optimizations.MixinRendererLivingEntity"
, "angelica.rendering.MixinRenderGlobal_SelectionBox"
, "angelica.textures.MixinForgeHooksClient_GuiSupersampling"
, "angelica.textures.MixinRenderBlocks_GuiSupersampling"
, "angelica.textures.MixinRenderItem_GuiSupersampling"
, "angelica.textures.MixinTileEntityRendererDispatcher_GuiSupersampling"
, "angelica.gui.MixinGuiIngameForge_ModernF3"
)
),
@@ -0,0 +1,18 @@
package com.gtnewhorizons.angelica.rendering;
import com.gtnewhorizons.angelica.glsm.GLStateManager;
import com.gtnewhorizons.angelica.proxy.ClientProxy;
public final class GuiBlockSupersampling {
private GuiBlockSupersampling() {}
public static int begin() {
if (!RenderingState.INSTANCE.isRenderingGuiItem() || RenderingState.INSTANCE.isRenderingWorld()) return 0;
final int samples = ClientProxy.options().quality.guiBlockSupersampling;
return samples > 1 ? GLStateManager.setTextureSupersamplingSamples(samples) : 0;
}
public static void end(int previous) {
if (previous != 0) GLStateManager.setTextureSupersamplingSamples(previous);
}
}
@@ -23,6 +23,12 @@ public class RenderingState {
@Getter
@Setter
private float fov;
@Getter
@Setter
private boolean renderingWorld;
@Getter
@Setter
private boolean renderingGuiItem;
public void setCameraPosition(double x, double y, double z) {