From bdd74e1e9338b18e4f80458f284d0c6a4d100f30 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Fri, 28 Jan 2022 08:37:12 +0100 Subject: DrawManager: Image engine support huge images. Adding better support for drawing huge images in the image/uv editor. Also solved tearing artifacts. The approach is that for each image/uv editor a screen space gpu texture is created that only contains the visible pixels. When zooming or panning the gpu texture is rebuild. Although the solution isn't memory intensive other parts of blender memory usage scales together with the image size. * Due to complexity we didn't implement partial updates when drawing images tiled (wrap repeat). This could be added, but is complicated as a change in the source could mean many different changes on the GPU texture. The work around for now is to tag all gpu textures to be dirty when changes are detected. Original plan was to have 4 screen space images to support panning without gpu texture creation. For now we don't see the need to implement it as the solution is already fast. Especially when GPU memory is shared with CPU ram. Reviewed By: fclem Maniphest Tasks: T92525, T92903 Differential Revision: https://developer.blender.org/D13424 --- source/blender/blenlib/BLI_math_matrix.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenlib/BLI_math_matrix.h') diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h index 65d654bc930..03b6ff25a4f 100644 --- a/source/blender/blenlib/BLI_math_matrix.h +++ b/source/blender/blenlib/BLI_math_matrix.h @@ -404,6 +404,7 @@ void invert_m4_m4_safe_ortho(float Ainv[4][4], const float A[4][4]); void scale_m3_fl(float R[3][3], float scale); void scale_m4_fl(float R[4][4], float scale); +void scale_m4_v2(float R[4][4], const float scale[2]); /** * This computes the overall volume scale factor of a transformation matrix. -- cgit v1.2.3