Reorganize SSAO config

This commit is contained in:
James Seibel
2023-09-06 21:25:13 -05:00
parent ea05ef3d3d
commit 36fc6aaea3
9 changed files with 241 additions and 103 deletions
@@ -0,0 +1,68 @@
/*
* This file is part of the Distant Horizons mod
* licensed under the GNU LGPL v3 License.
*
* Copyright (C) 2020-2023 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.distanthorizons.api.interfaces.config.client;
import com.seibel.distanthorizons.api.enums.rendering.EFogColorMode;
import com.seibel.distanthorizons.api.enums.rendering.EFogDistance;
import com.seibel.distanthorizons.api.enums.rendering.EFogDrawMode;
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigGroup;
import com.seibel.distanthorizons.api.interfaces.config.IDhApiConfigValue;
/**
* Distant Horizons' fog configuration. <br><br>
*
* @author James Seibel
* @version 2022-9-6
* @since API 1.0.0
*/
public interface IDhApiAmbientOcclusionConfig extends IDhApiConfigGroup
{
/** Determines if Ambient Occlusion is rendered */
IDhApiConfigValue<Boolean> enabled();
/**
* Determines how many points in space are sampled for the occlusion test.
* Higher numbers will improve quality and reduce banding, but will increase GPU load.
*/
IDhApiConfigValue<Integer> sampleCount();
/** Determines the radius Screen Space Ambient Occlusion is applied, measured in blocks. */
IDhApiConfigValue<Double> radius();
/** Determines how dark the Screen Space Ambient Occlusion effect will be. */
IDhApiConfigValue<Double> strength();
/** Increasing the value can reduce banding at the cost of reducing the strength of the effect. */
IDhApiConfigValue<Double> bias();
/**
* Determines how dark the occlusion shadows can be. <br>
* 0 = totally black at the corners <br>
* 1 = no shadow
*/
IDhApiConfigValue<Double> minLight();
/**
* The radius, measured in pixels, that blurring is calculated. <br>
* Higher numbers will reduce banding at the cost of GPU performance.
*/
IDhApiConfigValue<Integer> blurRadius();
}
@@ -40,6 +40,7 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
//===============//
IDhApiFogConfig fog();
IDhApiAmbientOcclusionConfig ambientOcclusion();
IDhApiNoiseTextureConfig noiseTexture();
@@ -84,20 +85,6 @@ public interface IDhApiGraphicsConfig extends IDhApiConfigGroup
/** Modifies the quadratic function fake chunks use for horizontal quality drop-off. */
IDhApiConfigValue<EHorizontalQuality> horizontalQuality();
IDhApiConfigValue<Boolean> ambientOcclusion();
IDhApiConfigValue<Integer> ambientOcclusion_SampleCount();
IDhApiConfigValue<Double> ambientOcclusion_Radius();
IDhApiConfigValue<Double> ambientOcclusion_Strength();
IDhApiConfigValue<Double> ambientOcclusion_Bias();
IDhApiConfigValue<Double> ambientOcclusion_MinLight();
IDhApiConfigValue<Integer> ambientOcclusion_BlurRadius();
IDhApiConfigValue<ETransparency> transparency();
/** Defines what blocks won't be rendered as LODs. */