Skip to content

Commit

Permalink
Change FBO color format to 16-bit from 8-bit
Browse files Browse the repository at this point in the history
There is a noticeable difference on 10+ bit+ monitors

Co-authored-by: Quexii <[email protected]>
  • Loading branch information
Luna0x01 and Quexii committed Jan 12, 2025
1 parent e13e944 commit dea413e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package dev.vexor.radium.mixin.core;

import net.minecraft.client.gl.Framebuffer;
import org.lwjgl.opengl.GL11;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(Framebuffer.class)
public class MixinFramebuffer {
@ModifyConstant(method = "attachTexture", constant = @Constant(intValue = 32856))
public int radium$attachTexture(int constant) {
return GL11.GL_RGBA16;
}
}
10 changes: 5 additions & 5 deletions common/src/main/resources/radium.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
"plugin": "dev.vexor.radium.mixin.RadiumMixinConfigPlugin",
"compatibilityLevel": "JAVA_17",
"client": [
"core.MixinFramebuffer",
"core.MixinMinecraftFixEarlyCrashNoReports",
"core.MixinScreenFixClipboard",
"extra.core.MixinGui",
"extra.core.MixinMinecraftClient",
"extra.animation.MixinSpriteAtlasTexture",
"extra.biome_colors.MixinBiomeColors",
"extra.core.MixinGui",
"extra.core.MixinMinecraftClient",
"extra.gui.MinecraftClientAccessor",
"extra.particle.MixinParticleEngine",
"extra.particle.MixinLevelRenderer",
"extra.particle.MixinParticleEngine",
"extra.prevent_shaders.MixinGameRenderer",
"extra.render.block.entity.MixinBeaconRenderer",
"extra.render.block.entity.MixinEnchantingTableBlockEntityRenderer",
Expand All @@ -24,9 +25,9 @@
"extra.sky.MixinSkyRenderer",
"extra.sky_colors.MixinBiome",
"extra.steady_debug_hud.MixinDebugScreenOverlay",
"sodium.core.MinecraftMixin",
"sodium.core.access.ABlockRenderManager",
"sodium.core.access.AFluidRenderer",
"sodium.core.MinecraftMixin",
"sodium.core.render.VertexFormatMixin",
"sodium.core.render.world.LevelRendererMixin",
"sodium.core.world.biome.ClientLevelMixin",
Expand All @@ -43,7 +44,6 @@
"sodium.features.render.immediate.DirectionMixin",
"sodium.features.textures.animations.SpriteMixin",
"sodium.features.textures.tracking.SpriteMixin"

],
"injectors": {
"defaultRequire": 1
Expand Down

0 comments on commit dea413e

Please sign in to comment.