diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-12 15:53:09 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-12 16:28:43 +0200 |
| commit | 506f87c554153eb0bbc3bc9e4fb0f26792f8bfca (patch) | |
| tree | 0b9af737ab98b44b0e59a2b6fb4d2d94d01f460c /shaders/tile.hpp | |
| parent | 903e1644fce5652a621803a6eb3617d605d22434 (diff) | |
depth buffer fixes
Diffstat (limited to 'shaders/tile.hpp')
| -rw-r--r-- | shaders/tile.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shaders/tile.hpp b/shaders/tile.hpp index fd3788f3..8415d836 100644 --- a/shaders/tile.hpp +++ b/shaders/tile.hpp @@ -37,9 +37,9 @@ struct tile_shader : GL::AbstractShaderProgram template<typename T, typename... Xs> decltype(auto) draw(T&& mesh, Xs&&... xs); - static constexpr float depth_tile_size = 3.56e-15; // 1 - nextafter(1, 0) * TILE_MAX_DIM / 2 - static constexpr float depth_start = -1 + depth_tile_size; - static constexpr float scenery_depth_offset = .5f, character_depth_offset = .5f; + static constexpr double depth_tile_size = 1/(double)(TILE_COUNT * 16 * 16); + static constexpr double depth_chunk_size = 1/(double)(16 * 16); + static constexpr float scenery_depth_offset = 0.5f, character_depth_offset = 0.5f, wall_depth_offset = 0.25f; private: void _draw(); |
