Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-11-26 17:32:42 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-11-26 17:55:28 +0300
commit630cb1bb1de1e67bef5ed2a202341b334188b62d (patch)
treeca0a90aa33830a2828b34c3934e5422135c8f84c /source/blender/editors/space_clip/clip_draw.c
parenta01ba66cf6972f80f835eee4fcbdcba49e4d111e (diff)
Clip Editor: Fix visualization of plane track image
Pair programming with Clement.
Diffstat (limited to 'source/blender/editors/space_clip/clip_draw.c')
-rw-r--r--source/blender/editors/space_clip/clip_draw.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index 80b58954c8f..63bf47412e8 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -1243,27 +1243,28 @@ static void draw_plane_marker_image(Scene *scene,
GPU_matrix_mul(gl_matrix);
GPUVertFormat *imm_format = immVertexFormat();
- uint pos = GPU_vertformat_attr_add(imm_format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
+ uint pos = GPU_vertformat_attr_add(imm_format, "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
uint texCoord = GPU_vertformat_attr_add(
imm_format, "texCoord", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
- immBindBuiltinProgram(GPU_SHADER_2D_IMAGE_COLOR);
- immUniformColor4f(1.0f, 1.0f, 1.0f, plane_track->image_opacity);
+ immBindBuiltinProgram(GPU_SHADER_3D_IMAGE_MODULATE_ALPHA);
+
+ immUniform1f("alpha", plane_track->image_opacity);
immUniform1i("image", 0);
immBegin(GPU_PRIM_TRI_FAN, 4);
immAttr2f(texCoord, 0.0f, 0.0f);
- immVertex2f(pos, 0.0f, 0.0f);
+ immVertex3f(pos, 0.0f, 0.0f, 0.0f);
immAttr2f(texCoord, 1.0f, 0.0f);
- immVertex2f(pos, 1.0f, 0.0f);
+ immVertex3f(pos, 1.0f, 0.0f, 0.0f);
immAttr2f(texCoord, 1.0f, 1.0f);
- immVertex2f(pos, 1.0f, 1.0f);
+ immVertex3f(pos, 1.0f, 1.0f, 0.0f);
immAttr2f(texCoord, 0.0f, 1.0f);
- immVertex2f(pos, 0.0f, 1.0f);
+ immVertex3f(pos, 0.0f, 1.0f, 0.0f);
immEnd();