diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-03 16:31:04 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-03 16:31:04 +0200 |
commit | 0e82239a9cf4be27fddd164bf654c6163eb51373 (patch) | |
tree | 7cfb203b1d9021c4f18c6206f38dfd93f1c026a2 /shaders | |
parent | b6cd1bfb40bbb0ef657092454c81def4e1b4907b (diff) |
a
Diffstat (limited to 'shaders')
-rw-r--r-- | shaders/tile-shader.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shaders/tile-shader.hpp b/shaders/tile-shader.hpp index 27126964..d58893d1 100644 --- a/shaders/tile-shader.hpp +++ b/shaders/tile-shader.hpp @@ -21,7 +21,7 @@ struct tile_shader : GL::AbstractShaderProgram Vector2 camera_offset() const { return camera_offset_; } tile_shader& set_camera_offset(Vector2 camera_offset); - static inline Vector2 project(Vector3 pt); + static constexpr Vector2 project(Vector3 pt); private: Vector2 scale_, camera_offset_; @@ -29,7 +29,7 @@ private: enum { ScaleUniform = 0, OffsetUniform = 1, }; }; -Vector2 tile_shader::project(Vector3 pt) +constexpr Vector2 tile_shader::project(const Vector3 pt) { float x = pt[1], y = pt[0], z = pt[2]; return { x-y, (x+y+z*2)*.75f }; |