summaryrefslogtreecommitdiffhomepage
path: root/shaders/shader.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-12-10 09:19:32 +0100
committerStanislaw Halik <sthalik@misaki.pl>2023-12-10 09:19:32 +0100
commit60c80cdca2108d05a0cd0cac8fcfc3658c4e3915 (patch)
treeeb415d0cf95b79919bae5e919d1f19626786524b /shaders/shader.hpp
parent3464b29a50c1718a298b7e48c5e9c0dd509f1bb1 (diff)
w
Diffstat (limited to 'shaders/shader.hpp')
-rw-r--r--shaders/shader.hpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/shaders/shader.hpp b/shaders/shader.hpp
index c50f4681..d66cccb0 100644
--- a/shaders/shader.hpp
+++ b/shaders/shader.hpp
@@ -40,11 +40,12 @@ struct tile_shader final : private GL::AbstractShaderProgram
template<typename T, typename... Xs> decltype(auto) draw(GL::AbstractTexture& tex, T&& mesh, Xs&&... xs);
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 character_depth_offset = 1 + 2./64;
+ static constexpr float scenery_depth_offset = 1 + 2./64;
static constexpr float ground_depth_offset = 0;
static constexpr float wall_depth_offset = 1;
- static constexpr float z_depth_offset = 1 + 2./64;
+ static constexpr float wall_overlay_depth_offset = 1 + 1./64;
+ static constexpr float z_depth_offset = 1 + 4./64;
static constexpr float depth_tile_size = 1.f/(TILE_MAX_DIM * 2 * max_screen_tiles.product());
static constexpr float foreshortening_factor = 0.578125f;