diff options
Diffstat (limited to 'shaders/tile.cpp')
| -rw-r--r-- | shaders/tile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shaders/tile.cpp b/shaders/tile.cpp index c8261acd..22a91497 100644 --- a/shaders/tile.cpp +++ b/shaders/tile.cpp @@ -66,11 +66,11 @@ void tile_shader::_draw() } } -float tile_shader::depth_value(const local_coords& xy) noexcept +float tile_shader::depth_value(const local_coords& xy, float offset) noexcept { constexpr float max = (TILE_MAX_DIM+1)*(TILE_MAX_DIM+1) * .5f; constexpr float min = -1 + 1.f/256; - float value = min + xy.to_index()/max; + float value = min + (xy.to_index() + offset)/max; fm_assert(value > -1 && value < 1); return value; } |
