diff options
Diffstat (limited to 'core/math/camera_matrix.cpp')
| -rw-r--r-- | core/math/camera_matrix.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/core/math/camera_matrix.cpp b/core/math/camera_matrix.cpp index f7dd8839b..3e3cd1af4 100644 --- a/core/math/camera_matrix.cpp +++ b/core/math/camera_matrix.cpp @@ -495,6 +495,28 @@ void CameraMatrix::set_light_bias() { } +void CameraMatrix::set_light_atlas_rect(const Rect2& p_rect) { + + float *m=&matrix[0][0]; + + m[0]=p_rect.size.width, + m[1]=0.0, + m[2]=0.0, + m[3]=0.0, + m[4]=0.0, + m[5]=p_rect.size.height, + m[6]=0.0, + m[7]=0.0, + m[8]=0.0, + m[9]=0.0, + m[10]=1.0, + m[11]=0.0, + m[12]=p_rect.pos.x, + m[13]=p_rect.pos.y, + m[14]=0.0, + m[15]=1.0; +} + CameraMatrix::operator String() const { String str; |
