mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-28 15:55:58 +00:00
Initial commit for gui-item-supersampling (#2299)
This commit is contained in:
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) {
|
||||
|
||||
Reference in new issue
Block a user