diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-08 07:48:50 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-08 07:48:50 +0100 |
commit | 430def68f4e38c9165c92e5de0f9e31c5b748c36 (patch) | |
tree | d0da5570dd2689e6ff170369e7a26b944270629a /shaders/tile.cpp | |
parent | 2cb3ba50b896fef785102b212fb172c3f7a45c28 (diff) |
precompute the scale shader uniform
Diffstat (limited to 'shaders/tile.cpp')
-rw-r--r-- | shaders/tile.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shaders/tile.cpp b/shaders/tile.cpp index 4fb7fe1b..2fb37cd8 100644 --- a/shaders/tile.cpp +++ b/shaders/tile.cpp @@ -37,7 +37,7 @@ tile_shader::~tile_shader() = default; tile_shader& tile_shader::set_scale(const Vector2& scale) { if (scale != _scale) - setUniform(ScaleUniform, _scale = scale); + setUniform(ScaleUniform, 1.f/(_scale = scale)); return *this; } |