From 57639186514079d3fce590006616c543628fe1d8 Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Mon, 5 Sep 2022 17:34:10 -0300 Subject: GPU: convert 'GPU_SHADER_2D_IMAGE_COLOR' to 3D 3D shaders work in both 2D and 3D viewports. This shader is a good candidate to be exposed in Python. --- source/blender/editors/sculpt_paint/paint_cursor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/sculpt_paint') diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 6241119c01e..164e13ac3c9 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -628,7 +628,7 @@ static bool paint_draw_tex_overlay(UnifiedPaintSettings *ups, /* Premultiplied alpha blending. */ GPU_blend(GPU_BLEND_ALPHA_PREMULT); - immBindBuiltinProgram(GPU_SHADER_2D_IMAGE_COLOR); + immBindBuiltinProgram(GPU_SHADER_3D_IMAGE_COLOR); float final_color[4] = {1.0f, 1.0f, 1.0f, 1.0f}; if (!col) { @@ -720,7 +720,7 @@ static bool paint_draw_cursor_overlay( GPU_blend(GPU_BLEND_ALPHA_PREMULT); - immBindBuiltinProgram(GPU_SHADER_2D_IMAGE_COLOR); + immBindBuiltinProgram(GPU_SHADER_3D_IMAGE_COLOR); float final_color[4] = {UNPACK3(U.sculpt_paint_overlay_col), 1.0f}; mul_v4_fl(final_color, brush->cursor_overlay_alpha * 0.01f); -- cgit v1.2.3