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/gpu/GPU_shader.h | |
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/gpu/GPU_shader.h')
-rw-r--r-- | source/blender/gpu/GPU_shader.h | 10 |
1 files changed, 9 insertions, 1 deletions
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, @@ -288,6 +287,15 @@ typedef enum eGPUBuiltinShader { */ 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. * * \param alpha: uniform float |