Skip to content

Commit 8829385

Browse files
committed
fix cloud raster reading
1 parent d58885a commit 8829385

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/main/java/de/bixilon/minosoft/gui/rendering/sky/clouds/CloudMatrix.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Minosoft
3-
* Copyright (C) 2020-2023 Moritz Zwerger
3+
* Copyright (C) 2020-2024 Moritz Zwerger
44
*
55
* 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.
66
*
@@ -37,10 +37,9 @@ class CloudMatrix {
3737
} else {
3838
val y = i / CLOUD_MATRIX_SIZE
3939
val x = i % CLOUD_MATRIX_SIZE
40-
matrix[i] = buffer.getRGBA(x, y) ushr 24 == 0xFF
40+
matrix[i] = buffer.getA(x, y) == 0xFF
4141
}
4242
}
43-
4443
}
4544

4645

src/main/java/de/bixilon/minosoft/gui/rendering/sky/clouds/CloudRenderer.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Minosoft
3-
* Copyright (C) 2020-2023 Moritz Zwerger
3+
* Copyright (C) 2020-2024 Moritz Zwerger
44
*
55
* 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.
66
*
@@ -165,8 +165,8 @@ class CloudRenderer(
165165
val over = (baseHeight - y)
166166
if (over > 0.0f) {
167167
yOffset = -(over / 15.0f).pow(2)
168-
if (yOffset < -100.0f) {
169-
yOffset = -100.0f
168+
if (yOffset < -80.0f) {
169+
yOffset = -80.0f
170170
}
171171
}
172172
shader.yOffset = yOffset

0 commit comments

Comments
 (0)