Skip to content

Add water reflection toggle - #1126

Open
dennisdevulder wants to merge 1 commit into
117HD:masterfrom
dennisdevulder:add-water-reflection-toggle
Open

Add water reflection toggle#1126
dennisdevulder wants to merge 1 commit into
117HD:masterfrom
dennisdevulder:add-water-reflection-toggle

Conversation

@dennisdevulder

@dennisdevulder dennisdevulder commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Adds a new Water Reflections setting under Environment settings.

When disabled, the shader removes the bright moving specular highlights from water while leaving the rest of the water look intact: animated normals, foam, shoreline translucency, surface color, and fresnel are preserved. The setting defaults to enabled, so existing visuals are unchanged unless users opt out.

This is intended to help users who are sensitive to bright moving water reflections.

Fixes #1032

Screenshots:

Screenshot.From.2026-06-27.20-33-36.png

Screenshot.From.2026-06-27.20-33-44.png

@dennisdevulder
dennisdevulder marked this pull request as draft June 27, 2026 18:29
@dennisdevulder
dennisdevulder force-pushed the add-water-reflection-toggle branch from 660cf8d to 19e5a15 Compare June 27, 2026 18:30
@dennisdevulder
dennisdevulder marked this pull request as ready for review June 27, 2026 18:35
@dennisdevulder
dennisdevulder force-pushed the add-water-reflection-toggle branch from 19e5a15 to 705228d Compare June 27, 2026 18:41

@aHooder aHooder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a decent implementation, but I would change it to use a shader #define, since it's a rarely changed option. That is, remove the UBO additions and add another define here & use preprocessor macro #if in the shader:

.define("UI_SCALING_MODE", config.uiScalingMode())
.define("COLOR_BLINDNESS", config.colorBlindness())
.define("APPLY_COLOR_FILTER", configColorFilter != ColorFilter.NONE)
.define("MATERIAL_COUNT", MaterialManager.MATERIALS.length)
.define("WATER_TYPE_COUNT", waterTypeManager.uboWaterTypes.getCount())
.define("DYNAMIC_LIGHTS", configDynamicLights != DynamicLights.NONE)
.define("TILED_LIGHTING", configTiledLighting)
.define("TILED_LIGHTING_LAYER_COUNT", configDynamicLights.getTiledLightingLayers())
.define("TILED_LIGHTING_TILE_SIZE", TILED_LIGHTING_TILE_SIZE)
.define("MAX_LIGHT_COUNT", configTiledLighting ? UBOLights.MAX_LIGHTS : configDynamicLights.getMaxSceneLights())
.define("NORMAL_MAPPING", config.normalMapping())
.define("PARALLAX_OCCLUSION_MAPPING", config.parallaxOcclusionMapping())
.define("SHADOW_MODE", configShadowMode)
.define("SHADOW_TRANSPARENCY", config.shadowTransparency())
.define("SHADOW_FILTERING", config.shadowFiltering())
.define("SHADOW_RESOLUTION", config.shadowResolution())
.define("VANILLA_COLOR_BANDING", config.vanillaColorBanding())
.define("UNDO_VANILLA_SHADING", configShadingMode.undoVanillaShading)
.define("LEGACY_GREY_COLORS", configLegacyGreyColors)
.define("DISABLE_DIRECTIONAL_SHADING", !configShadingMode.directionalShading)
.define("FLAT_SHADING", config.flatShading())
.define("WIND_DISPLACEMENT", configWindDisplacement)
.define("WIND_DISPLACEMENT_NOISE_RESOLUTION", WIND_DISPLACEMENT_NOISE_RESOLUTION)
.define("CHARACTER_DISPLACEMENT", configCharacterDisplacement)
.define("MAX_CHARACTER_POSITION_COUNT", max(1, UBOCompute.MAX_CHARACTER_POSITION_COUNT))
.define("WIREFRAME", config.wireframe())
.define("WINDOWS_HDR_CORRECTION", config.windowsHdrCorrection())
.define("LEGACY_RENDERER", renderer instanceof LegacyRenderer)
.define("ZONE_RENDERER", renderer instanceof ZoneRenderer)
.define("MAX_SIMULTANEOUS_WORLD_VIEWS", 0)
.define("WORLD_VIEW_GETTER", "")

The remaining issue is this naming will be confusing with the upcoming water in #626, which will have proper reflections. To get around this, we could rename the config to something like Water sun reflection, but on top of this, the new water is likely to come after #655, at which point the sun reflection may be directly tied to the skybox & no longer easy to disable via a toggle. This all depends on the implementation though, but this is all to say that if we add this toggle, it's likely to end up as a legacy toggle anyway. We might as well leave this PR open for the time being though.

@dennisdevulder
dennisdevulder force-pushed the add-water-reflection-toggle branch from 705228d to 9eaceeb Compare July 19, 2026 22:51
@dennisdevulder

dennisdevulder commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, that makes sense. I've updated this to use a shader define and renamed the setting to Water sun reflection, so it's clearer that this controls the existing sun highlight rather than the proper reflections planned for the new water.

It now only toggles the sun highlight and leaves point-light highlights alone. I've tested both states in-game and rebased the PR onto the latest master as well.

Happy to revisit the naming or placement once the direction of #655 and #626 becomes clearer.

on:
Screenshot From 2026-07-20 00-49-31
off:
Screenshot From 2026-07-20 00-50-02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Accessibility] Option to disable water lighting/reflection

2 participants