summaryrefslogtreecommitdiffhomepage
path: root/shaders/tile.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-08 07:48:50 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-08 07:48:50 +0100
commit430def68f4e38c9165c92e5de0f9e31c5b748c36 (patch)
treed0da5570dd2689e6ff170369e7a26b944270629a /shaders/tile.cpp
parent2cb3ba50b896fef785102b212fb172c3f7a45c28 (diff)
precompute the scale shader uniform
Diffstat (limited to 'shaders/tile.cpp')
-rw-r--r--shaders/tile.cpp2
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;
}