[Bf-blender-cvs] [f9aab6717bd] master: Merge branch 'blender-v3.1-release'

Jacques Lucke noreply at git.blender.org
Fri Feb 4 13:11:25 CET 2022


Commit: f9aab6717bd5c47e19a93f3ad6eb3500888f12d4
Author: Jacques Lucke
Date:   Fri Feb 4 13:11:18 2022 +0100
Branches: master
https://developer.blender.org/rBf9aab6717bd5c47e19a93f3ad6eb3500888f12d4

Merge branch 'blender-v3.1-release'

===================================================================



===================================================================

diff --cc source/blender/draw/engines/image/image_drawing_mode.hh
index 0450bb2b548,16d3ff30890..a80b6b1ea95
--- a/source/blender/draw/engines/image/image_drawing_mode.hh
+++ b/source/blender/draw/engines/image/image_drawing_mode.hh
@@@ -252,19 -274,20 +273,20 @@@ template<typename TextureMethod> class 
          if (!region_overlap) {
            continue;
          }
 -        // convert the overlapping region to texel space and to ss_pixel space...
 -        // TODO: first convert to ss_pixel space as integer based. and from there go back to texel
 -        // space. But perhaps this isn't needed and we could use an extraction offset somehow.
 +        /* Convert the overlapping region to texel space and to ss_pixel space...
 +         * TODO: first convert to ss_pixel space as integer based. and from there go back to texel
 +         * space. But perhaps this isn't needed and we could use an extraction offset somehow. */
          rcti gpu_texture_region_to_update;
-         BLI_rcti_init(&gpu_texture_region_to_update,
-                       floor((changed_overlapping_region_in_uv_space.xmin - info.uv_bounds.xmin) *
-                             texture_width / BLI_rctf_size_x(&info.uv_bounds)),
-                       floor((changed_overlapping_region_in_uv_space.xmax - info.uv_bounds.xmin) *
-                             texture_width / BLI_rctf_size_x(&info.uv_bounds)),
-                       ceil((changed_overlapping_region_in_uv_space.ymin - info.uv_bounds.ymin) *
-                            texture_height / BLI_rctf_size_y(&info.uv_bounds)),
-                       ceil((changed_overlapping_region_in_uv_space.ymax - info.uv_bounds.ymin) *
-                            texture_height / BLI_rctf_size_y(&info.uv_bounds)));
+         BLI_rcti_init(
+             &gpu_texture_region_to_update,
+             floor((changed_overlapping_region_in_uv_space.xmin - info.region_uv_bounds.xmin) *
+                   texture_width / BLI_rctf_size_x(&info.region_uv_bounds)),
+             floor((changed_overlapping_region_in_uv_space.xmax - info.region_uv_bounds.xmin) *
+                   texture_width / BLI_rctf_size_x(&info.region_uv_bounds)),
+             ceil((changed_overlapping_region_in_uv_space.ymin - info.region_uv_bounds.ymin) *
+                  texture_height / BLI_rctf_size_y(&info.region_uv_bounds)),
+             ceil((changed_overlapping_region_in_uv_space.ymax - info.region_uv_bounds.ymin) *
+                  texture_height / BLI_rctf_size_y(&info.region_uv_bounds)));
  
          rcti tile_region_to_extract;
          BLI_rcti_init(
@@@ -452,13 -479,14 +478,14 @@@
      instance_data->partial_update.ensure_image(image);
      instance_data->clear_dirty_flag();
  
 -    // Step: Find out which screen space textures are needed to draw on the screen. Remove the
 -    // screen space textures that aren't needed.
 +    /* Step: Find out which screen space textures are needed to draw on the screen. Remove the
 +     * screen space textures that aren't needed. */
      const ARegion *region = draw_ctx->region;
      method.update_screen_space_bounds(region);
-     method.update_uv_bounds(region);
+     method.update_region_uv_bounds(region);
+     method.update_screen_uv_bounds();
  
 -    // Step: Update the GPU textures based on the changes in the image.
 +    /* Step: Update the GPU textures based on the changes in the image. */
      instance_data->update_gpu_texture_allocations();
      update_textures(*instance_data, image, iuser);
  
diff --cc source/blender/draw/engines/image/image_texture_info.hh
index 571328cca9f,5cf9016a8c8..8c3b7494831
--- a/source/blender/draw/engines/image/image_texture_info.hh
+++ b/source/blender/draw/engines/image/image_texture_info.hh
@@@ -44,13 -44,15 +44,15 @@@ struct TextureInfo 
  
    /** \brief area of the texture in screen space. */
    rctf clipping_bounds;
-   /** \brief uv area of the texture. */
-   rctf uv_bounds;
+   /** \brief uv area of the texture (copy from ARegion). */
+   rctf region_uv_bounds;
+   /** \brief uv area of the texture in screen space. */
+   rctf clipping_uv_bounds;
  
    /**
 -   * \brief Batch to draw the associated texton the screen.
 +   * \brief Batch to draw the associated text on the screen.
     *
 -   * contans a VBO with `pos` and 'uv'.
 +   * Contains a VBO with `pos` and `uv`.
     * `pos` (2xF32) is relative to the origin of the space.
     * `uv` (2xF32) reflect the uv bounds.
     */



More information about the Bf-blender-cvs mailing list