diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-06-07 20:53:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-07 20:53:55 +0200 |
commit | 5ebdfc31b290e8bf42c387ad7b2f65c4c45c7853 (patch) | |
tree | 8d6030b8eb8a2c6bf27eb42a03b008f8a423f975 /core/math | |
parent | e136f4741c91c20fb18c44d31d4c6f88e9d1d171 (diff) | |
parent | ba832d83b2dafcdbb79b93b1e97fd518c12b97bf (diff) |
Merge pull request #61319 from JFonS/taa_wip
Initial TAA implementation
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/camera_matrix.cpp | 5 | ||||
-rw-r--r-- | core/math/camera_matrix.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/core/math/camera_matrix.cpp b/core/math/camera_matrix.cpp index 9443addd22..57c53b0adb 100644 --- a/core/math/camera_matrix.cpp +++ b/core/math/camera_matrix.cpp @@ -710,6 +710,11 @@ void CameraMatrix::scale_translate_to_fit(const AABB &p_aabb) { matrix[3][3] = 1; } +void CameraMatrix::add_jitter_offset(const Vector2 &p_offset) { + matrix[3][0] += p_offset.x; + matrix[3][1] += p_offset.y; +} + CameraMatrix::operator Transform3D() const { Transform3D tr; const real_t *m = &matrix[0][0]; diff --git a/core/math/camera_matrix.h b/core/math/camera_matrix.h index f1aea5e4e8..a4051cee3b 100644 --- a/core/math/camera_matrix.h +++ b/core/math/camera_matrix.h @@ -95,6 +95,7 @@ struct CameraMatrix { operator String() const; void scale_translate_to_fit(const AABB &p_aabb); + void add_jitter_offset(const Vector2 &p_offset); void make_scale(const Vector3 &p_scale); int get_pixels_per_meter(int p_for_pixel_width) const; operator Transform3D() const; |