Skip to content

Commit

Permalink
config stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Goby56 committed Aug 18, 2024
1 parent ea54b14 commit f6c28bd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/goby56/wakes/config/WakesConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ public class WakesConfig {
public boolean drawDebugBoxes = false;
public boolean showDebugInfo = false;
public RenderType renderType = RenderType.AUTO;
public boolean useLODs = true;
public float shader_light_passthrough = 0.5f;
public float shaderLightPassthrough = 0.5f;

// Appearance
public Resolution wakeResolution = Resolution.SIXTEEN;
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/com/goby56/wakes/config/YACLIntegration.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static Screen createScreen(Screen parent) {
.controller(opt -> integerSlider(opt, 0, 100))
.build())
.option(optionOf(Float.class, "shader_light_passthrough", true)
.binding(0.5f, () -> config.shader_light_passthrough, val -> config.shader_light_passthrough = val)
.binding(0.5f, () -> config.shaderLightPassthrough, val -> config.shaderLightPassthrough = val)
.controller(opt -> floatSlider(opt, 0, 1, 0.01f))
.build())
.build())
Expand Down Expand Up @@ -136,9 +136,6 @@ public static Screen createScreen(Screen parent) {
.option(booleanOption("disable_mod", false)
.binding(false, () -> config.disableMod, val -> config.disableMod = val)
.build())
.option(booleanOption("use_lods", false)
.binding(false, () -> config.useLODs, val -> config.useLODs = val)
.build())
.group(intervalGroup(0, WakeColor.TRANSPARENT, -50, -45))
.group(intervalGroup(1, WakeColor.DARK_GRAY, -45, -35))
.group(intervalGroup(2, WakeColor.GRAY, -35, -30))
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/goby56/wakes/render/enums/WakeColor.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private int blend(int waterColor, int lightColor, float opacity, boolean isWhite
}

private static double invertedLogisticCurve(float x) {
float k = WakesClient.CONFIG_INSTANCE.shader_light_passthrough;
float k = WakesClient.CONFIG_INSTANCE.shaderLightPassthrough;
return WakesClient.areShadersEnabled ? k * (4 * Math.pow(x - 0.5f, 3) + 0.5f) : x;
}

Expand Down

0 comments on commit f6c28bd

Please sign in to comment.