From 30adc3373057357b33e817792a35169eaf848c87 Mon Sep 17 00:00:00 2001 From: Falk David Date: Wed, 16 Oct 2024 10:29:07 +0200 Subject: [PATCH] Fix #128827: GPv3: Bucket fill doesn't work on macOS The issue was that the shader `gpu_shader_gpencil_stroke_vert_no_geom.glsl` assumed a wrong format of the color attribute (`uchar4` instead of `float4`). The fix uses `vertex_fetch_attribute` with `float4`. Pull Request: https://projects.blender.org/blender/blender/pulls/129072 --- .../gpu/shaders/gpu_shader_gpencil_stroke_vert_no_geom.glsl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/blender/gpu/shaders/gpu_shader_gpencil_stroke_vert_no_geom.glsl b/source/blender/gpu/shaders/gpu_shader_gpencil_stroke_vert_no_geom.glsl index d524d1d862d..4913a0f0802 100644 --- a/source/blender/gpu/shaders/gpu_shader_gpencil_stroke_vert_no_geom.glsl +++ b/source/blender/gpu/shaders/gpu_shader_gpencil_stroke_vert_no_geom.glsl @@ -220,9 +220,8 @@ void main(void) for (int i = 0; i < 4; i++) { finalPos[i] = ModelViewProjectionMatrix * vec4(vertex_fetch_attribute(input_prim_id + i, pos, vec3).xyz, 1.0); - /* Color attribute uses GPU_FETCH_INT_TO_FLOAT_UNIT with GPU_COMP_U8. */ - finalColor[i] = uchar4_to_normalized_vec4( - vertex_fetch_attribute(input_prim_id + i, color, uchar4)); + /* Attribute is expected to be in the float4 format. */ + finalColor[i] = vertex_fetch_attribute(input_prim_id + i, color, float4); float in_thickness = vertex_fetch_attribute(input_prim_id + i, thickness, float); if (gpencil_stroke_data.keep_size) {