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/gpu/GPU_shader.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source/blender/gpu/GPU_shader.h') diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h index d694fcf4da1..0db61bedc2c 100644 --- a/source/blender/gpu/GPU_shader.h +++ b/source/blender/gpu/GPU_shader.h @@ -212,7 +212,6 @@ typedef enum eGPUBuiltinShader { * \param color: in vec4 * \param pos: in vec2 */ - GPU_SHADER_2D_IMAGE_COLOR, GPU_SHADER_2D_IMAGE_DESATURATE_COLOR, GPU_SHADER_2D_IMAGE_RECT_COLOR, GPU_SHADER_2D_IMAGE_MULTI_RECT_COLOR, @@ -287,6 +286,15 @@ typedef enum eGPUBuiltinShader { * \param pos: in vec3 */ GPU_SHADER_3D_IMAGE, + /** + * Take a 3D position and color for each vertex with linear interpolation in window space. + * + * \param color: uniform vec4 + * \param image: uniform sampler2D + * \param texCoord: in vec2 + * \param pos: in vec3 + */ + GPU_SHADER_3D_IMAGE_COLOR, /** * Draw texture with alpha. Take a 3D position and a 2D texture coordinate for each vertex. * -- cgit v1.2.3