diff --git a/src/main/java/com/seibel/lod/core/api/external/apiObjects/enums/EDhApiDropoffQuality.java b/src/main/java/com/seibel/lod/core/api/external/apiObjects/enums/EDhApiDropoffQuality.java new file mode 100644 index 000000000..c3447a0a2 --- /dev/null +++ b/src/main/java/com/seibel/lod/core/api/external/apiObjects/enums/EDhApiDropoffQuality.java @@ -0,0 +1,54 @@ +/* + * This file is part of the Distant Horizons mod (formerly the LOD Mod), + * licensed under the GNU LGPL v3 License. + * + * Copyright (C) 2022 Tom Lee (TomTheFurry) + * Copyright (C) 2020-2022 James Seibel + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +package com.seibel.lod.core.api.external.apiObjects.enums; + +/** + * AUTO
+ * SMOOTH_DROPOFF
+ * PERFORMANCE_FOCUSED

+ * + * Determines how lod level drop off should be done + * + * @author Tom Lee + * @version 7-1-2022 + */ +public enum EDhApiDropoffQuality +{ + // Reminder: + // when adding items up the API minor version + // when removing items up the API major version + + + /** SMOOTH_DROPOFF when <128 lod view distance, or PERFORMANCE_FOCUSED otherwise */ + AUTO(-1), + + SMOOTH_DROPOFF(10), + + PERFORMANCE_FOCUSED(0); + + public final int fastModeSwitch; + + EDhApiDropoffQuality(int fastModeSwitch) { + this.fastModeSwitch = fastModeSwitch; + } + + +} diff --git a/src/main/java/com/seibel/lod/core/api/external/apiObjects/enums/EDhApiHorizontalQuality.java b/src/main/java/com/seibel/lod/core/api/external/apiObjects/enums/EDhApiHorizontalQuality.java new file mode 100644 index 000000000..3b12789a6 --- /dev/null +++ b/src/main/java/com/seibel/lod/core/api/external/apiObjects/enums/EDhApiHorizontalQuality.java @@ -0,0 +1,58 @@ +/* + * This file is part of the Distant Horizons mod (formerly the LOD Mod), + * licensed under the GNU LGPL v3 License. + * + * Copyright (C) 2020-2022 James Seibel + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, version 3. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +package com.seibel.lod.core.api.external.apiObjects.enums; + +/** + * LOWEST
+ * LOW
+ * MEDIUM
+ * HIGH

+ * + * this indicates the base of the quadratic function we use for the quality drop-off + * + * @author Leonardo Amato + * @version 9-29-2021 + */ +public enum EDhApiHorizontalQuality +{ + // Reminder: + // when adding items up the API minor version + // when removing items up the API major version + + + /** 1.0 AKA Linear */ + LOWEST(1.0f), + + /** exponent 1.5 */ + LOW(1.5f), + + /** exponent 2.0 */ + MEDIUM(2.0f), + + /** exponent 2.2 */ + HIGH(2.2f); + + public final double quadraticBase; + + EDhApiHorizontalQuality(double distanceUnit) + { + this.quadraticBase = distanceUnit; + } +} \ No newline at end of file diff --git a/src/main/java/com/seibel/lod/core/api/external/config/client/graphics/DhApiGraphics.java b/src/main/java/com/seibel/lod/core/api/external/config/client/graphics/DhApiGraphics.java index a68844cec..0cd558d39 100644 --- a/src/main/java/com/seibel/lod/core/api/external/config/client/graphics/DhApiGraphics.java +++ b/src/main/java/com/seibel/lod/core/api/external/config/client/graphics/DhApiGraphics.java @@ -1,13 +1,11 @@ package com.seibel.lod.core.api.external.config.client.graphics; -import com.seibel.lod.core.api.external.apiObjects.enums.EDhApiFogDistance; -import com.seibel.lod.core.api.external.apiObjects.enums.EDhApiRendererType; -import com.seibel.lod.core.api.external.apiObjects.enums.EDhApiVanillaOverdraw; +import com.seibel.lod.core.api.external.apiObjects.enums.*; import com.seibel.lod.core.api.external.apiObjects.wrapperInterfaces.IDhApiConfig; import com.seibel.lod.core.api.implementation.objects.GenericEnumConverter; import com.seibel.lod.core.api.implementation.wrappers.DhApiConfig; import com.seibel.lod.core.config.Config; -import com.seibel.lod.core.enums.config.EVanillaOverdraw; +import com.seibel.lod.core.enums.config.*; import com.seibel.lod.core.enums.rendering.EFogDistance; import com.seibel.lod.core.enums.rendering.ERendererType; import com.seibel.lod.core.config.Config.Client.Graphics.Quality; @@ -39,6 +37,48 @@ public class DhApiGraphics { return new DhApiConfig<>(Debugging.rendererType, new GenericEnumConverter<>(ERendererType.class, EDhApiRendererType.class)); } + + //==================// + // graphic settings // + //==================// + + /** + * Returns the config related to what the maximum detail level + * Distant Horizons' fake chunks should be rendered at. + */ + public static IDhApiConfig getMaxDetailLevelConfig() + { return new DhApiConfig<>(Quality.drawResolution, new GenericEnumConverter<>(EHorizontalResolution.class, EDhApiHorizontalQuality.class)); } + + /** + * Returns the config related to how detailed Distant Horizons fake chunks + * should be on the vertical axis. + */ + public static IDhApiConfig getVerticalQualityConfig() + { return new DhApiConfig<>(Quality.verticalQuality, new GenericEnumConverter<>(EVerticalQuality.class, EDhApiVerticalQuality.class)); } + + /** + * Returns the config related to how quickly Distant Horizons fake chunks + * drop in quality as they get farther away from the player. + */ + public static IDhApiConfig getHorizontalQualityDropoffConfig() + { return new DhApiConfig<>(Quality.horizontalQuality, new GenericEnumConverter<>(EHorizontalQuality.class, EDhApiHorizontalQuality.class)); } + + /** + * Returns the config related to how quickly Distant Horizons fake chunks + * drop in quality as they get farther away from the player. + */ + public static IDhApiConfig getHorizontalQualityDropoffMethodConfig() + { return new DhApiConfig<>(Quality.dropoffQuality, new GenericEnumConverter<>(EDropoffQuality.class, EDhApiDropoffQuality.class)); } + + /** + * Returns the config related to how smooth Distant Horizons fake chunk + * biome blending should be generated. + */ + public static IDhApiConfig getBiomeBlendingConfig() + { return new DhApiConfig<>(Quality.lodBiomeBlending); } + + + //===========================// // advanced graphic settings // //===========================// diff --git a/src/main/java/com/seibel/lod/core/enums/config/EDropoffQuality.java b/src/main/java/com/seibel/lod/core/enums/config/EDropoffQuality.java index cf06cc653..2a579a920 100644 --- a/src/main/java/com/seibel/lod/core/enums/config/EDropoffQuality.java +++ b/src/main/java/com/seibel/lod/core/enums/config/EDropoffQuality.java @@ -23,8 +23,8 @@ package com.seibel.lod.core.enums.config; /** * AUTO
* SMOOTH_DROPOFF
- * PERFORMANCE_FOCUSED
- *
+ * PERFORMANCE_FOCUSED

+ * * Determines how lod level drop off should be done * * @author Tom Lee @@ -32,7 +32,11 @@ package com.seibel.lod.core.enums.config; */ public enum EDropoffQuality { - + // Reminder: + // when adding items up the API minor version + // when removing items up the API major version + + /** SMOOTH_DROPOFF when <128 lod view distance, or PERFORMANCE_FOCUSED otherwise */ AUTO(-1), diff --git a/src/main/java/com/seibel/lod/core/enums/config/EHorizontalQuality.java b/src/main/java/com/seibel/lod/core/enums/config/EHorizontalQuality.java index efaf28877..ccbf96e47 100644 --- a/src/main/java/com/seibel/lod/core/enums/config/EHorizontalQuality.java +++ b/src/main/java/com/seibel/lod/core/enums/config/EHorizontalQuality.java @@ -20,18 +20,23 @@ package com.seibel.lod.core.enums.config; /** - * Lowest
- * Low
- * Medium
- * High
- *
- * this indicates the base of the quadratic function we use for the quality drop off + * LOWEST
+ * LOW
+ * MEDIUM
+ * HIGH

+ * + * this indicates the base of the quadratic function we use for the quality drop-off * * @author Leonardo Amato * @version 9-29-2021 */ public enum EHorizontalQuality { + // Reminder: + // when adding items up the API minor version + // when removing items up the API major version + + /** 1.0 AKA Linear */ LOWEST(1.0f),