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/windowmanager/intern | |
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/windowmanager/intern')
-rw-r--r-- | source/blender/windowmanager/intern/wm_dragdrop.cc | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_playanim.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_dragdrop.cc b/source/blender/windowmanager/intern/wm_dragdrop.cc index fa8cc842037..94bd33a9765 100644 --- a/source/blender/windowmanager/intern/wm_dragdrop.cc +++ b/source/blender/windowmanager/intern/wm_dragdrop.cc @@ -837,7 +837,7 @@ static void wm_drag_draw_icon(bContext *UNUSED(C), y = xy[1] - (wm_drag_imbuf_icon_height_get(drag) / 2); const float col[4] = {1.0f, 1.0f, 1.0f, 0.65f}; /* this blends texture */ - IMMDrawPixelsTexState state = immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_COLOR); + IMMDrawPixelsTexState state = immDrawPixelsTexSetup(GPU_SHADER_3D_IMAGE_COLOR); immDrawPixelsTexTiled_scaling(&state, x, y, diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 54c3cc3342c..f37fc6ec483 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -2328,7 +2328,7 @@ static void radial_control_paint_tex(RadialControl *rc, float radius, float alph GPU_matrix_rotate_2d(RAD2DEGF(rot)); } - immBindBuiltinProgram(GPU_SHADER_2D_IMAGE_COLOR); + immBindBuiltinProgram(GPU_SHADER_3D_IMAGE_COLOR); immUniformColor3fvAlpha(col, alpha); immBindTexture("image", rc->texture); diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c index 08987af46ca..60f3842bc7c 100644 --- a/source/blender/windowmanager/intern/wm_playanim.c +++ b/source/blender/windowmanager/intern/wm_playanim.c @@ -482,7 +482,7 @@ static void draw_display_buffer(PlayState *ps, ImBuf *ibuf) GPU_texture_bind(texture, 0); if (!glsl_used) { - immBindBuiltinProgram(GPU_SHADER_2D_IMAGE_COLOR); + immBindBuiltinProgram(GPU_SHADER_3D_IMAGE_COLOR); immUniformColor3f(1.0f, 1.0f, 1.0f); } |