[Bf-blender-cvs] [085329f114b] master: Fix T81002: Images drawn with the Python gpu module no longer draw on top in the Image Editor

Jeroen Bakker noreply at git.blender.org
Tue Sep 22 11:20:59 CEST 2020


Commit: 085329f114beb904ed3ef0c8ec6894ee26916704
Author: Jeroen Bakker
Date:   Tue Sep 22 11:17:17 2020 +0200
Branches: master
https://developer.blender.org/rB085329f114beb904ed3ef0c8ec6894ee26916704

Fix T81002: Images drawn with the Python gpu module no longer draw on top in the Image Editor

Since {D8234} the image editor is drawn using a depth buffer.
When using `draw_texture_2d` the image is drawn using the 2D_IMAGE
shader. inside the vertex buffer the image was pushed to the background.
This was introduced by {648924333234} what seems to be out dated as we
have done several overhauls in this area. (workbench refactor, overlay
engine refactor, color management pipeline).

This patch removes the pushing of the image to the background.

===================================================================

M	source/blender/gpu/shaders/gpu_shader_2D_image_vert.glsl

===================================================================

diff --git a/source/blender/gpu/shaders/gpu_shader_2D_image_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_image_vert.glsl
index cdb066c9c52..95055d4decb 100644
--- a/source/blender/gpu/shaders/gpu_shader_2D_image_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_2D_image_vert.glsl
@@ -9,6 +9,5 @@ out vec2 texCoord_interp;
 void main()
 {
   gl_Position = ModelViewProjectionMatrix * vec4(pos.xy, 0.0f, 1.0f);
-  gl_Position.z = 1.0;
   texCoord_interp = texCoord;
 }



More information about the Bf-blender-cvs mailing list