diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-12 19:52:58 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-12 19:53:16 +0200 |
commit | d748a3c14e4f5346bc8aff6882c1d082cf3fbd22 (patch) | |
tree | 97325dd0d4e02319177bfb4dc88998401a25ace1 /shaders | |
parent | e919e87ffad2f7271b64190d6df358444d000d44 (diff) |
introduce constant for max chunks drawn on screen
Diffstat (limited to 'shaders')
-rw-r--r-- | shaders/tile.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shaders/tile.hpp b/shaders/tile.hpp index f1e14c9e..8c65b6fa 100644 --- a/shaders/tile.hpp +++ b/shaders/tile.hpp @@ -37,7 +37,8 @@ struct tile_shader : GL::AbstractShaderProgram template<typename T, typename... Xs> decltype(auto) draw(T&& mesh, Xs&&... xs); - static constexpr float depth_tile_size = 1/(double)(TILE_COUNT * 16 * 16); + static constexpr Vector2s max_screen_tiles{16, 16}; + static constexpr float depth_tile_size = 1/(double)(TILE_COUNT * max_screen_tiles.product()); static constexpr float scenery_depth_offset = 0.25f, character_depth_offset = 0.25f, wall_depth_offset = 0.125f; private: |