diff options
| author | Mel <einebeere@gmail.com> | 2023-07-11 04:52:24 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2023-07-11 04:52:24 +0200 |
| commit | 0ce26f2a49fd6d64a690b84b1932126edfbfbee6 (patch) | |
| tree | f0846f7f0e394d3c213986a2f85e0240dc8e5402 /src/Math/MVP.hpp | |
| parent | e6812d2df6bd8a0a71375096abe46f8039d8c570 (diff) | |
| download | meowcraft-0ce26f2a49fd6d64a690b84b1932126edfbfbee6.tar.zst meowcraft-0ce26f2a49fd6d64a690b84b1932126edfbfbee6.zip | |
Add simple scrolling non-tiling 2D clouds
Diffstat (limited to 'src/Math/MVP.hpp')
| -rw-r--r-- | src/Math/MVP.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Math/MVP.hpp b/src/Math/MVP.hpp index 4046a50..b7341a8 100644 --- a/src/Math/MVP.hpp +++ b/src/Math/MVP.hpp @@ -5,11 +5,12 @@ namespace Math::MVP { template<typename T = Real> -Matrix<4, 4, T> model(Vector<3> position, Rotation angles) { +Matrix<4, 4, T> model(Vector<3> position, Vector<3> size, Rotation angles) { auto transformation = Matrix<4, 4, T>::transformation(position); + auto scale = Matrix<4, 4, T>::scale(size); auto rotation = Matrix<4, 4, T>::rotation(angles); - return transformation * rotation; + return transformation * rotation * scale; } template<typename T = Real> |
