summaryrefslogtreecommitdiffhomepage
path: root/shaders
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-22 03:19:29 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-22 03:19:29 +0100
commit0fa4a8542bf9eda8bd9c28da199b3e90e04279b9 (patch)
tree8a91894a3b9eebdb8a7ef3c4b3e94d169efcf8ea /shaders
parent966ac722d72c8d89e621987090b19f2bde0cb58c (diff)
wip
Diffstat (limited to 'shaders')
-rw-r--r--shaders/tile.cpp2
-rw-r--r--shaders/tile.hpp6
2 files changed, 3 insertions, 5 deletions
diff --git a/shaders/tile.cpp b/shaders/tile.cpp
index bc5de830..7fa703fc 100644
--- a/shaders/tile.cpp
+++ b/shaders/tile.cpp
@@ -39,7 +39,7 @@ tile_shader::~tile_shader() = default;
tile_shader& tile_shader::set_scale(const Vector2& scale)
{
if (scale != _scale)
- setUniform(ScaleUniform, 1.f/(_scale = scale));
+ setUniform(ScaleUniform, 2.f/(_scale = scale));
return *this;
}
diff --git a/shaders/tile.hpp b/shaders/tile.hpp
index 4acc556b..5d763331 100644
--- a/shaders/tile.hpp
+++ b/shaders/tile.hpp
@@ -33,8 +33,7 @@ struct tile_shader : GL::AbstractShaderProgram
template<typename T = float> static constexpr Math::Vector2<T> unproject(const Math::Vector2<T>& px);
template<typename T, typename... Xs>
- auto draw(T&& mesh, Xs&&... xs) ->
- decltype(GL::AbstractShaderProgram::draw(std::forward<T>(mesh), std::forward<Xs>(xs)...));
+ decltype(auto) draw(T&& mesh, Xs&&... xs);
private:
void _draw();
@@ -48,8 +47,7 @@ private:
};
template<typename T, typename... Xs>
-auto tile_shader::draw(T&& mesh, Xs&&... xs) ->
- decltype(GL::AbstractShaderProgram::draw(std::forward<T>(mesh), std::forward<Xs>(xs)...))
+decltype(auto) tile_shader::draw(T&& mesh, Xs&&... xs)
{
_draw();
return GL::AbstractShaderProgram::draw(std::forward<T>(mesh), std::forward<Xs>(xs)...);