summaryrefslogtreecommitdiffhomepage
path: root/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'shaders')
-rw-r--r--shaders/tile.cpp2
-rw-r--r--shaders/tile.hpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/shaders/tile.cpp b/shaders/tile.cpp
index 803165d5..9725c974 100644
--- a/shaders/tile.cpp
+++ b/shaders/tile.cpp
@@ -75,7 +75,7 @@ void tile_shader::_draw()
float tile_shader::depth_value(const local_coords& xy, float offset) noexcept
{
- return (xy.to_index() + offset) * depth_tile_size;
+ return ((float)xy.x + (float)xy.y + offset) * depth_tile_size;
}
} // namespace floormat
diff --git a/shaders/tile.hpp b/shaders/tile.hpp
index 2eb3f0ca..47ec2f35 100644
--- a/shaders/tile.hpp
+++ b/shaders/tile.hpp
@@ -37,8 +37,8 @@ struct tile_shader : GL::AbstractShaderProgram
template<typename T, typename... Xs>
decltype(auto) draw(T&& mesh, Xs&&... xs);
- static constexpr Vector2s max_screen_tiles{16, 16};
- static constexpr float depth_tile_size = 1/(double)(TILE_COUNT * max_screen_tiles.product());
+ static constexpr Vector2s max_screen_tiles{32, 32};
+ static constexpr float depth_tile_size = 1/(double)(TILE_MAX_DIM * 2 * max_screen_tiles.product());
static constexpr float scenery_depth_offset = 0.25f, character_depth_offset = 0.25f, wall_depth_offset = 0;
private: