Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main/java/rs117/hd/HdPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -1950,8 +1950,8 @@ else if (config.fogDepthMode() == FogDepthMode.NONE)
glUniform1f(uniLightningBrightness, environmentManager.lightningBrightness);
glUniform1i(uniPointLightsCount, Math.min(configMaxDynamicLights, lightManager.visibleLightsCount));

glUniform1f(uniSaturation, config.saturation().getAmount());
glUniform1f(uniContrast, config.contrast().getAmount());
glUniform1f(uniSaturation, config.saturation() / 100f);
glUniform1f(uniContrast, config.contrast() / 100f);
glUniform1i(uniUnderwaterEnvironment, environmentManager.isUnderwater() ? 1 : 0);
glUniform1i(uniUnderwaterCaustics, config.underwaterCaustics() ? 1 : 0);
glUniform3fv(uniUnderwaterCausticsColor, environmentManager.currentUnderwaterCausticsColor);
Expand Down Expand Up @@ -2268,7 +2268,7 @@ void generateHDSceneData()
@Subscribe
public void onConfigChanged(ConfigChanged event)
{
if (!event.getGroup().equals("hd"))
if (!event.getGroup().equals(CONFIG_GROUP))
{
return;
}
Expand Down
36 changes: 28 additions & 8 deletions src/main/java/rs117/hd/HdPluginConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@

import static rs117.hd.HdPlugin.MAX_DISTANCE;
import static rs117.hd.HdPlugin.MAX_FOG_DEPTH;
import static rs117.hd.HdPluginConfig.CONFIG_GROUP;

import rs117.hd.config.*;

@ConfigGroup("hd")
@ConfigGroup(CONFIG_GROUP)
public interface HdPluginConfig extends Config
{
String CONFIG_GROUP = "hd";

/*====== General settings ======*/

@ConfigSection(
Expand Down Expand Up @@ -203,25 +206,41 @@ default boolean flashingEffects()
}

@ConfigItem(
keyName = "saturation",
keyName = "fSaturation",
name = "Saturation",
description = "Controls the saturation of the final rendered image.",
description = "Controls the saturation of the final rendered image.<br>" +
"Intended to be kept between 0% and 120%.",
position = 11,
section = generalSettings
)
default Saturation saturation()
@Units(Units.PERCENT)
@Range(min = -500, max = 500)
default int saturation()
{
return (int) (oldSaturationDropdown().getAmount() * 100);
}
@ConfigItem(keyName = "saturation", hidden = true, name = "", description = "")
default Saturation oldSaturationDropdown()
{
return Saturation.DEFAULT;
}

@ConfigItem(
keyName = "contrast",
keyName = "fContrast",
name = "Contrast",
description = "Controls the contrast of the final rendered image.",
description = "Controls the contrast of the final rendered image.<br>" +
"Intended to be kept between 90% and 110%.",
position = 12,
section = generalSettings
)
default Contrast contrast()
@Units(Units.PERCENT)
@Range(min = -500, max = 500)
default int contrast()
{
return (int) (oldContrastDropdown().getAmount() * 100);
}
@ConfigItem(keyName = "contrast", hidden = true, name = "", description = "")
default Contrast oldContrastDropdown()
{
return Contrast.DEFAULT;
}
Expand All @@ -233,7 +252,8 @@ default Contrast contrast()
@ConfigItem(
keyName = "brightness2",
name = "Brightness",
description = "Controls the brightness of environmental lighting.",
description = "Controls the brightness of environmental lighting.<br>" +
"A brightness value of 20 is recommended.",
position = 13,
section = generalSettings
)
Expand Down