summaryrefslogtreecommitdiffhomepage
path: root/shaders/shader.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-01-11 13:35:19 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-01-11 13:35:19 +0100
commit8da414ed881af4f30905c1e20fc4d579ed1fb2f1 (patch)
tree42c28927373e2382c7b73a638f144f7196d28969 /shaders/shader.cpp
parent0b6a28eaf5973f0485ae8a6f869ebb543b1e470c (diff)
fix wall corner depth value vs critter/scenery
Diffstat (limited to 'shaders/shader.cpp')
-rw-r--r--shaders/shader.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/shaders/shader.cpp b/shaders/shader.cpp
index a276f053..a4ec9dad 100644
--- a/shaders/shader.cpp
+++ b/shaders/shader.cpp
@@ -98,7 +98,12 @@ void tile_shader::draw_post(GL::AbstractTexture& tex) // NOLINT(*-convert-member
float tile_shader::depth_value(const local_coords& xy, float offset) noexcept
{
- return ((float)xy.x + (float)xy.y + offset) * depth_tile_size;
+ return depth_value((float)xy.x, (float)xy.y, offset);
+}
+
+float tile_shader::depth_value(float x, float y, float offset) noexcept
+{
+ return (x + y + offset) * depth_tile_size;
}
} // namespace floormat