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
This commit is contained in:
@@ -220,9 +220,8 @@ void main(void)
|
|||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
finalPos[i] = ModelViewProjectionMatrix *
|
finalPos[i] = ModelViewProjectionMatrix *
|
||||||
vec4(vertex_fetch_attribute(input_prim_id + i, pos, vec3).xyz, 1.0);
|
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. */
|
/* Attribute is expected to be in the float4 format. */
|
||||||
finalColor[i] = uchar4_to_normalized_vec4(
|
finalColor[i] = vertex_fetch_attribute(input_prim_id + i, color, float4);
|
||||||
vertex_fetch_attribute(input_prim_id + i, color, uchar4));
|
|
||||||
float in_thickness = vertex_fetch_attribute(input_prim_id + i, thickness, float);
|
float in_thickness = vertex_fetch_attribute(input_prim_id + i, thickness, float);
|
||||||
|
|
||||||
if (gpencil_stroke_data.keep_size) {
|
if (gpencil_stroke_data.keep_size) {
|
||||||
|
|||||||
Reference in New Issue
Block a user