diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-04-06 17:08:10 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-04-06 17:08:50 +0200 |
commit | 27dc0027f294b8b3ed9a5dac5809c7fbaeb20ddb (patch) | |
tree | 414eda28495c58d5d6c6531bf8c92a07420c018e | |
parent | ebc4ec79247ff39b7156ec18f27b2766ff79d9fc (diff) |
shaders: fix imprecise float constant
-rw-r--r-- | shaders/shader.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shaders/shader.hpp b/shaders/shader.hpp index 864e20b7..b431cba0 100644 --- a/shaders/shader.hpp +++ b/shaders/shader.hpp @@ -49,7 +49,7 @@ struct tile_shader final : private GL::AbstractShaderProgram static constexpr float wall_side_offset = 1 - 4./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; + static constexpr float foreshortening_factor = float(0.577350269189625764509148780501957456L); tile_shader& set_sampler(Int sampler); Int sampler() const { return _sampler; } |