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:
authorJeroen Bakker <jeroen@blender.org>2021-11-05 16:51:55 +0300
committerJeroen Bakker <jeroen@blender.org>2021-11-05 16:51:55 +0300
commit00734d57248423b982e75f9d2398e4b7cdf1fe4a (patch)
tree2991cc17365121ed3bed35ae64254f6fa5f7a3ca /source/blender/editors/space_clip/clip_draw.c
parent29e5c330cff8b7c68317b91502e29058b4f670fb (diff)
Fix T92807: Incorrect display planar tracking.
Issue introduced in {7e66616b7e15} where the shader was replaced with a 2d image shader. This patch reverts several commits that removed the 3d image shader.
Diffstat (limited to 'source/blender/editors/space_clip/clip_draw.c')
-rw-r--r--source/blender/editors/space_clip/clip_draw.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index 471b4a4bf5b..4bccb3664da 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -1219,10 +1219,11 @@ static void draw_plane_marker_image(Scene *scene,
uint texCoord = GPU_vertformat_attr_add(
imm_format, "texCoord", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
- immBindBuiltinProgram(GPU_SHADER_2D_IMAGE_COLOR);
+ /* Use 3D image for correct display of planar tracked images. */
+ immBindBuiltinProgram(GPU_SHADER_3D_IMAGE_MODULATE_ALPHA);
immBindTexture("image", texture);
- immUniformColor4f(1.0f, 1.0f, 1.0f, plane_track->image_opacity);
+ immUniform1f("alpha", plane_track->image_opacity);
immBegin(GPU_PRIM_TRI_FAN, 4);