diff --git a/forge122/src/main/java/org/taumc/celeritas/impl/gui/SodiumGameOptionPages.java b/forge122/src/main/java/org/taumc/celeritas/impl/gui/SodiumGameOptionPages.java index 63d934149..e263948e0 100644 --- a/forge122/src/main/java/org/taumc/celeritas/impl/gui/SodiumGameOptionPages.java +++ b/forge122/src/main/java/org/taumc/celeritas/impl/gui/SodiumGameOptionPages.java @@ -205,6 +205,15 @@ public class SodiumGameOptionPages { .setImpact(OptionImpact.LOW) .setFlags(OptionFlag.REQUIRES_RENDERER_RELOAD) .build()) + .add(OptionImpl.createBuilder(int.class, sodiumOpts) + .setId(StandardOptions.Option.BIOME_BLEND) + .setName(ComponentUtil.translatable("sodium.options.biomeBlendRadius")) + .setTooltip(ComponentUtil.translatable("sodium.options.biome_blend.tooltip")) + .setControl(option -> new SliderControl(option, 0, 7, 1, ControlValueFormatter.biomeBlend())) + .setBinding((opts, value) -> opts.quality.biomeBlendRadius = value, opts -> opts.quality.biomeBlendRadius) + .setImpact(OptionImpact.LOW) + .setFlags(OptionFlag.REQUIRES_RENDERER_RELOAD) + .build()) .add(OptionImpl.createBuilder(boolean.class, vanillaOpts) .setId(StandardOptions.Option.ENTITY_SHADOWS) .setName(ComponentUtil.translatable("options.entityShadows")) diff --git a/forge122/src/main/java/org/taumc/celeritas/impl/gui/SodiumGameOptions.java b/forge122/src/main/java/org/taumc/celeritas/impl/gui/SodiumGameOptions.java index 48ac329e3..b885ae982 100644 --- a/forge122/src/main/java/org/taumc/celeritas/impl/gui/SodiumGameOptions.java +++ b/forge122/src/main/java/org/taumc/celeritas/impl/gui/SodiumGameOptions.java @@ -142,6 +142,7 @@ public class SodiumGameOptions { public GraphicsQuality weatherQuality; public GraphicsQuality leavesQuality; public boolean enableVignette; + public int biomeBlendRadius = 3; public QualitySettings() { this.weatherQuality = SodiumGameOptions.GraphicsQuality.DEFAULT; diff --git a/forge122/src/main/java/org/taumc/celeritas/impl/gui/options/storage/SodiumOptionsStorage.java b/forge122/src/main/java/org/taumc/celeritas/impl/gui/options/storage/SodiumOptionsStorage.java index 7302180fa..7cb2b8c30 100644 --- a/forge122/src/main/java/org/taumc/celeritas/impl/gui/options/storage/SodiumOptionsStorage.java +++ b/forge122/src/main/java/org/taumc/celeritas/impl/gui/options/storage/SodiumOptionsStorage.java @@ -25,6 +25,6 @@ public class SodiumOptionsStorage implements OptionStorage { throw new RuntimeException("Couldn't save configuration changes", e); } - CeleritasVintage.logger().info("Flushed changes to Embeddium configuration"); + CeleritasVintage.logger().info("Flushed changes to Celeritas configuration"); } } diff --git a/forge122/src/main/java/org/taumc/celeritas/impl/world/WorldSlice.java b/forge122/src/main/java/org/taumc/celeritas/impl/world/WorldSlice.java index f4c197247..9605b8cd4 100644 --- a/forge122/src/main/java/org/taumc/celeritas/impl/world/WorldSlice.java +++ b/forge122/src/main/java/org/taumc/celeritas/impl/world/WorldSlice.java @@ -26,6 +26,7 @@ import org.embeddedt.embeddium.impl.util.PositionUtil; import org.embeddedt.embeddium.impl.util.position.SectionPos; import org.jetbrains.annotations.Nullable; import org.joml.Vector3i; +import org.taumc.celeritas.CeleritasVintage; import org.taumc.celeritas.impl.compat.fluidlogged.FluidloggedCompat; import org.taumc.celeritas.impl.render.terrain.CeleritasWorldRenderer; import org.taumc.celeritas.impl.world.biome.BiomeColorCache; @@ -172,7 +173,7 @@ public class WorldSlice implements CeleritasBlockAccess { this.sections = new ClonedChunkSection[SECTION_TABLE_ARRAY_SIZE]; this.blockStatesArrays = new IBlockState[SECTION_TABLE_ARRAY_SIZE][]; this.biomeCaches = new Biome[SECTION_TABLE_ARRAY_SIZE][16 * 16]; - this.biomeColorCache = new BiomeColorCache(this, 3); + this.biomeColorCache = new BiomeColorCache(this, CeleritasVintage.options().quality.biomeBlendRadius); if(!FluidloggedCompat.IS_LOADED) this.fluidStatesArrays = null; else this.fluidStatesArrays = new Object[SECTION_TABLE_ARRAY_SIZE][]; diff --git a/forge122/src/main/java/org/taumc/celeritas/mixin/core/terrain/BiomeColorHelperMixin.java b/forge122/src/main/java/org/taumc/celeritas/mixin/core/terrain/BiomeColorHelperMixin.java index d7fd2e116..b16cd5ffd 100644 --- a/forge122/src/main/java/org/taumc/celeritas/mixin/core/terrain/BiomeColorHelperMixin.java +++ b/forge122/src/main/java/org/taumc/celeritas/mixin/core/terrain/BiomeColorHelperMixin.java @@ -5,6 +5,7 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.biome.BiomeColorHelper; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Overwrite; +import org.taumc.celeritas.CeleritasVintage; import org.taumc.celeritas.impl.world.cloned.CeleritasBlockAccess; @Mixin(value = BiomeColorHelper.class, priority = 1200) @@ -20,7 +21,8 @@ public class BiomeColorHelperMixin { // Use Sodium's more efficient biome cache return ((CeleritasBlockAccess)blockAccess).getBlockTint(pos, colorResolver); } - int radius = 3; // TODO make configurable + + int radius = CeleritasVintage.options().quality.biomeBlendRadius; if (radius == 0) { return colorResolver.getColorAtPos(blockAccess.getBiome(pos), pos); } else { @@ -45,5 +47,4 @@ public class BiomeColorHelperMixin { return (i / blockCount & 255) << 16 | (j / blockCount & 255) << 8 | k / blockCount & 255; } } -} - +} \ No newline at end of file diff --git a/forge122/src/main/resources/assets/celeritas/lang/en_US.lang b/forge122/src/main/resources/assets/celeritas/lang/en_US.lang index fc0c6d5b6..db1be14a0 100644 --- a/forge122/src/main/resources/assets/celeritas/lang/en_US.lang +++ b/forge122/src/main/resources/assets/celeritas/lang/en_US.lang @@ -14,7 +14,7 @@ celeritas.options.inactivity_fps_limit.tooltip=Controls how the game limits fram celeritas.options.use_faster_clouds.name=Use Faster Clouds celeritas.options.use_faster_clouds.tooltip=When enabled, Celeritas replaces vanilla cloud rendering with a less glitchy and potentially faster implementation. Disable this if mods' cloud customizations aren't visible. celeritas.options.async_graph_search.name=Async Occlusion Culling -celeritas.options.async_graph_search.tooltip=Performs occlusion/frustum culling asynchronously, up to one frame behind the current camera position. This can improve frametimes, particularly at higher render distances, but at the cost of chunks popping into view if the camera is turned too aggressively." +celeritas.options.async_graph_search.tooltip=Performs occlusion/frustum culling asynchronously, up to one frame behind the current camera position. This can improve frametimes, particularly at higher render distances, but at the cost of chunks popping into view if the camera is turned too aggressively. sodium.option_impact.low=Low sodium.option_impact.medium=Medium sodium.option_impact.high=High @@ -41,7 +41,7 @@ sodium.options.leaves_quality.tooltip=Controls the quality of leaves. sodium.options.particle_quality.tooltip=Controls the maximum number of particles which can be present on screen at any one time. sodium.options.smooth_lighting.tooltip=Controls whether blocks will be smoothly lit and shaded. This slightly increases the amount of time needed to re-build a chunk but doesn't affect frame rates. sodium.options.biome_blend.value=%s block(s) -sodium.options.biome_blend.tooltip=Controls the range which biomes will be sampled for block colorization. Higher values greatly increase the amount of time it takes to build chunks for diminishing improvements in quality. +sodium.options.biome_blend.tooltip=Controls the range which biomes will be sampled for block colorization. Higher values greatly increase the amount of time it takes to build chunks for diminishing improvements in quality.\nNot compatible with the Better/Betterer Biome Blend mod sodium.options.entity_distance.tooltip=Controls how far away entities can render from the player. Higher values increase the render distance at the expense of frame rates. sodium.options.entity_shadows.tooltip=If enabled basic shadows will be rendered beneath mobs and other entities. sodium.options.vignette.name=Vignette @@ -50,7 +50,7 @@ sodium.options.mipmap_levels.tooltip=Controls the number of mipmaps which will b sodium.options.use_block_face_culling.name=Use Block Face Culling sodium.options.use_block_face_culling.tooltip=If enabled only the sides of blocks which are facing the camera will be submitted for rendering. This can eliminate a large number of block faces very early in the rendering process saving memory bandwidth and time on the GPU. Some resource packs may have issues with this option so try disabling it if you're seeing holes in blocks. sodium.options.use_compact_vertex_format.name=Use Compact Vertex Format -sodium.options.use_compact_vertex_format.tooltip=If enabled a more compact vertex format will be used for rendering chunks. This can reduce graphics memory usage and bandwidth requirements significantly especially for integrated graphics cards but can cause z-fighting with some resource packs due to how it reduces the precision of position and texture coordinate attributes. Disabling this has no effect if Oculus is installed. +sodium.options.use_compact_vertex_format.tooltip=If enabled a more compact vertex format will be used for rendering chunks. This can reduce graphics memory usage and bandwidth requirements significantly especially for integrated graphics cards but can cause z-fighting with some resource packs due to how it reduces the precision of position and texture coordinate attributes. sodium.options.translucent_face_sorting.name=Translucent Face Sorting sodium.options.translucent_face_sorting.tooltip=If enabled translucent effects from surfaces such as stained glass and water will be applied correctly. sodium.options.use_fog_occlusion.name=Use Fog Occlusion @@ -80,3 +80,4 @@ sodium.console.pojav_launcher=PojavLauncher is not supported when using Celerita sodium.console.core_shaders_error=The following resource packs are incompatible with Celeritas: sodium.console.core_shaders_warn=The following resource packs may be incompatible with Celeritas: sodium.console.core_shaders_info=Check the game log for detailed information. +sodium.options.biomeBlendRadius=Biome Blend