Skip to content

Commit

Permalink
fix cloud raster reading
Browse files Browse the repository at this point in the history
  • Loading branch information
Bixilon committed Mar 1, 2024
1 parent d58885a commit 8829385
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Minosoft
* Copyright (C) 2020-2023 Moritz Zwerger
* 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.
*
Expand Down Expand Up @@ -37,10 +37,9 @@ class CloudMatrix {
} else {
val y = i / CLOUD_MATRIX_SIZE
val x = i % CLOUD_MATRIX_SIZE
matrix[i] = buffer.getRGBA(x, y) ushr 24 == 0xFF
matrix[i] = buffer.getA(x, y) == 0xFF
}
}

}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Minosoft
* Copyright (C) 2020-2023 Moritz Zwerger
* 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.
*
Expand Down Expand Up @@ -165,8 +165,8 @@ class CloudRenderer(
val over = (baseHeight - y)
if (over > 0.0f) {
yOffset = -(over / 15.0f).pow(2)
if (yOffset < -100.0f) {
yOffset = -100.0f
if (yOffset < -80.0f) {
yOffset = -80.0f
}
}
shader.yOffset = yOffset
Expand Down

0 comments on commit 8829385

Please sign in to comment.