-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FogFlags are way cleaner and allow further extension of the fog system (e.g. custom behavior for versions, change shape of shader, ...) This fixe the invisible block glitch when being e.g. in a debugger/profiler while joining (the fog settings were messed up because the interpolation sucked)
- Loading branch information
Showing
21 changed files
with
374 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
176 changes: 0 additions & 176 deletions
176
src/main/java/de/bixilon/minosoft/gui/rendering/camera/FogManager.kt
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
src/main/java/de/bixilon/minosoft/gui/rendering/camera/fog/FogFlags.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Minosoft | ||
* Copyright (C) 2020-2024 Moritz Zwerger | ||
* | ||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | ||
* | ||
* 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 General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
* | ||
* This software is not affiliated with Mojang AB, the original developer of Minecraft. | ||
*/ | ||
|
||
package de.bixilon.minosoft.gui.rendering.camera.fog | ||
|
||
import de.bixilon.kutil.enums.ValuesEnum | ||
import de.bixilon.kutil.enums.ValuesEnum.Companion.names | ||
|
||
enum class FogFlags { | ||
ENABLE, | ||
USE_COLOR, | ||
; | ||
|
||
|
||
val mask = 0x01 shl ordinal | ||
|
||
|
||
companion object : ValuesEnum<FogFlags> { | ||
override val VALUES = values() | ||
override val NAME_MAP = names() | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/de/bixilon/minosoft/gui/rendering/camera/fog/FogInterpolationStart.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Minosoft | ||
* Copyright (C) 2020-2024 Moritz Zwerger | ||
* | ||
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | ||
* | ||
* 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 General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
* | ||
* This software is not affiliated with Mojang AB, the original developer of Minecraft. | ||
*/ | ||
|
||
package de.bixilon.minosoft.gui.rendering.camera.fog | ||
|
||
import de.bixilon.minosoft.data.text.formatting.color.RGBColor | ||
|
||
class FogInterpolationStart { | ||
var start: Float = 0.0f | ||
var end: Float = 0.0f | ||
var color: RGBColor? = null | ||
var change = -1L | ||
} |
Oops, something went wrong.