make water overlay less bright

Now it does not look that weird anymore
This commit is contained in:
Bixilon 2022-12-16 15:52:07 +01:00
parent eaeb59132c
commit 970b7929d2
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -29,7 +29,8 @@ class WaterOverlay(renderWindow: RenderWindow) : SimpleOverlay(renderWindow) {
get() = player.gamemode != Gamemodes.SPECTATOR && player.submergedFluid is WaterFluid
override fun draw() {
val brightness = renderWindow.connection.world.getBrightness(renderWindow.connection.player.positionInfo.blockPosition)
// TODO: make brightness depend on ambient light (e.g. rain gradient, thunder gradient, time, ...)
val brightness = renderWindow.connection.world.getBrightness(renderWindow.connection.player.positionInfo.blockPosition) * 0.5f
tintColor = RGBColor(brightness, brightness, brightness, 0.1f)
// ToDo: Minecraft sets the uv coordinates according to the yaw and pitch (see InGameOverlayRenderer::renderUnderwaterOverlay)