[Bf-blender-cvs] [67adfe52c1f] temp-texture-painting-gpu: Fix some issues where painting on the incorrect layer happened.

Jeroen Bakker noreply at git.blender.org
Wed Oct 12 12:58:17 CEST 2022


Commit: 67adfe52c1fe990d48f5e06b4cc600c2dbc0b9b2
Author: Jeroen Bakker
Date:   Wed Oct 12 12:58:05 2022 +0200
Branches: temp-texture-painting-gpu
https://developer.blender.org/rB67adfe52c1fe990d48f5e06b4cc600c2dbc0b9b2

Fix some issues where painting on the incorrect layer happened.

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

M	source/blender/editors/sculpt_paint/sculpt_paint_image.cc
M	source/blender/gpu/shaders/sculpt_paint/infos/sculpt_paint_image_info.hh

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

diff --git a/source/blender/editors/sculpt_paint/sculpt_paint_image.cc b/source/blender/editors/sculpt_paint/sculpt_paint_image.cc
index 8c3c5d337ea..8bccec85898 100644
--- a/source/blender/editors/sculpt_paint/sculpt_paint_image.cc
+++ b/source/blender/editors/sculpt_paint/sculpt_paint_image.cc
@@ -1037,7 +1037,7 @@ static void gpu_painting_image_merge(GPUSculptPaintData &batches,
   batches.tile_texture.bind(shader);
   GPU_texture_image_bind(canvas_tex, GPU_shader_get_texture_binding(shader, "texture_img"));
   batches.tile_texture.foreach_in_frame([shader](PaintTileData &paint_tile) {
-    printf("%s: merging tile %d {tile:%d sub_tile:%d,%d} \n",
+    printf("%s: merging tile stored on layer %d {tile:%d sub_tile:%d,%d} \n",
            __func__,
            paint_tile.layer_id,
            paint_tile.tile_number,
diff --git a/source/blender/gpu/shaders/sculpt_paint/infos/sculpt_paint_image_info.hh b/source/blender/gpu/shaders/sculpt_paint/infos/sculpt_paint_image_info.hh
index 1428733c5b5..1051abc63e9 100644
--- a/source/blender/gpu/shaders/sculpt_paint/infos/sculpt_paint_image_info.hh
+++ b/source/blender/gpu/shaders/sculpt_paint/infos/sculpt_paint_image_info.hh
@@ -14,7 +14,7 @@ GPU_SHADER_CREATE_INFO(sculpt_paint_sub_tiles)
 
 GPU_SHADER_CREATE_INFO(sculpt_paint_image_compute)
     .local_group_size(1, 1, 1)
-    .image(0, GPU_RGBA16F, Qualifier::READ_WRITE, ImageType::FLOAT_2D_ARRAY, "paint_tiles_img")
+    .image(0, GPU_RGBA16F, Qualifier::READ_WRITE, ImageType::FLOAT_3D, "paint_tiles_img")
     .storage_buf(1, Qualifier::READ, "PackedPixelRow", "pixel_row_buf[]")
     .storage_buf(2, Qualifier::READ, "TrianglePaintInput", "paint_input[]")
     .storage_buf(3, Qualifier::READ, "vec3", "vert_coord_buf[]")
@@ -29,7 +29,7 @@ GPU_SHADER_CREATE_INFO(sculpt_paint_image_compute)
 
 GPU_SHADER_CREATE_INFO(sculpt_paint_image_merge_compute)
     .local_group_size(1, 1, 1)
-    .image(0, GPU_RGBA16F, Qualifier::READ, ImageType::FLOAT_2D_ARRAY, "paint_tiles_img")
+    .image(0, GPU_RGBA16F, Qualifier::READ, ImageType::FLOAT_3D, "paint_tiles_img")
     .image(1, GPU_RGBA16F, Qualifier::READ_WRITE, ImageType::FLOAT_2D, "texture_img")
     .push_constant(Type::INT, "layer_id")
     .compute_source("sculpt_paint_image_merge_comp.glsl")



More information about the Bf-blender-cvs mailing list