diff options
Diffstat (limited to 'shaders/shader.hpp')
-rw-r--r-- | shaders/shader.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/shaders/shader.hpp b/shaders/shader.hpp index 280850b9..a8f778da 100644 --- a/shaders/shader.hpp +++ b/shaders/shader.hpp @@ -37,9 +37,12 @@ struct tile_shader : GL::AbstractShaderProgram template<typename T, typename... Xs> decltype(auto) draw(T&& mesh, Xs&&... xs); - static const Vector2s max_screen_tiles; - static const float depth_tile_size; - static const float character_depth_offset, scenery_depth_offset, wall_depth_offset, z_depth_offset; + static constexpr Vector2s max_screen_tiles = {8, 8}; + static constexpr float character_depth_offset = 1 + 1./64; + static constexpr float scenery_depth_offset = 1 + 1./64; + static constexpr float wall_depth_offset = 1; + static constexpr float z_depth_offset = 1 + 2./64; + static constexpr float depth_tile_size = 1/(double)(TILE_MAX_DIM * 2 * max_screen_tiles.product()); private: void _draw(); |