Add DhApiGraphics settings
This commit is contained in:
+54
@@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.core.api.external.apiObjects.enums;
|
||||
|
||||
/**
|
||||
* AUTO <br>
|
||||
* SMOOTH_DROPOFF <br>
|
||||
* PERFORMANCE_FOCUSED <br> <br>
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Vendored
+58
@@ -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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.seibel.lod.core.api.external.apiObjects.enums;
|
||||
|
||||
/**
|
||||
* LOWEST <br>
|
||||
* LOW <br>
|
||||
* MEDIUM <br>
|
||||
* HIGH <br> <br>
|
||||
*
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
+44
-4
@@ -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<EDhApiHorizontalQuality> 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<EDhApiVerticalQuality> 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<EDhApiHorizontalQuality> 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<EDhApiDropoffQuality> 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<Integer> getBiomeBlendingConfig()
|
||||
{ return new DhApiConfig<>(Quality.lodBiomeBlending); }
|
||||
|
||||
|
||||
|
||||
//===========================//
|
||||
// advanced graphic settings //
|
||||
//===========================//
|
||||
|
||||
@@ -23,8 +23,8 @@ package com.seibel.lod.core.enums.config;
|
||||
/**
|
||||
* AUTO <br>
|
||||
* SMOOTH_DROPOFF <br>
|
||||
* PERFORMANCE_FOCUSED <br>
|
||||
* <br>
|
||||
* PERFORMANCE_FOCUSED <br> <br>
|
||||
*
|
||||
* 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),
|
||||
|
||||
|
||||
@@ -20,18 +20,23 @@
|
||||
package com.seibel.lod.core.enums.config;
|
||||
|
||||
/**
|
||||
* Lowest <br>
|
||||
* Low <br>
|
||||
* Medium <br>
|
||||
* High <br>
|
||||
* <br>
|
||||
* this indicates the base of the quadratic function we use for the quality drop off
|
||||
* LOWEST <br>
|
||||
* LOW <br>
|
||||
* MEDIUM <br>
|
||||
* HIGH <br> <br>
|
||||
*
|
||||
* 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),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user