diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2022-09-05 23:34:10 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2022-09-05 23:34:10 +0300 |
commit | 57639186514079d3fce590006616c543628fe1d8 (patch) | |
tree | 62f82cbe7eb3178ad94bbeb20e93fe0047c24177 /source/blender/editors/sculpt_paint/paint_cursor.c | |
parent | 4536de98d18b8887edee37b03a12da015590bb45 (diff) |
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.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_cursor.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |