Images drawn with the Python gpu module no longer draw on top in the Image Editor #81002
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#81002
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Linux-5.4.43-x86_64-Intel-R-_Core-TM-i7-7500U_CPU@_2.70GHz-with-slackware-14.2 64 Bits
Graphics card: Mesa Intel(R) HD Graphics 620 (KBL GT2) Intel 4.6 (Core Profile) Mesa 20.1.0
Blender Version
Broken: version: 2.91.0 Alpha, branch: master, hash:
f470a02afa
, commit date: 2020-09-20 05:59Worked: version: 2.91.0 Alpha, branch: master, hash:
66078594d1
Short description of error
When drawing images with the python gpu module, they will no longer draw on top of the region's contents or of other python rendering.
This problem happens in the Image Editor, but not the Sequence Editor.
Before:
(2 square images and a circle are drawn with Python, 'POST_PIXEL' in the Image Editor, which shows a rectangular image)
After:
(the circle, drawn first, shows on top. The Image Editor's image also shows on top)
Exact steps for others to reproduce the error
See the attached .blend file.
python_gl_draw_image.blend
Added subscriber: @brita
Added subscriber: @Jeroen-Bakker
Could this be related to the depth tricks that the image editor currently uses? https://wiki.blender.org/wiki/Source/EEVEE_%26_Viewport/Draw_Engines/Image_Engine#Depth_Buffer
What happens when you draw with DEPTH_ALWAYS on? Or with write depth.
Currently when drawing via python it draws directly to the overlay buffer. https://wiki.blender.org/wiki/Source/EEVEE_%26_Viewport/GPU_Module/GPUViewport when transferring to display it might not have the correct data inside the buffers.
I will check later today with renderdoc to see what is happening and what needs to be corrected/documented.
Thanks!
Changed status from 'Needs Triage' to: 'Confirmed'
This issue was referenced by
085329f114
The circle is rendered with gl_depth 0, write depth is on and depth function is
less equal
.The textures are rendered with gl_depth 1, write depth is on and depth function is
less equal
.The image of the image editor is drawn using gl_depth of 0.75 as part of the new draw pipeline.
Looking at https://developer.blender.org/diffusion/B/browse/master/source/blender/gpu/shaders/gpu_shader_2D_image_vert.glsl the gl_depth is set to 1 for images so they always render in the background.
This was introduced by https://developer.blender.org/rB648924333234a1fd0fee91851bb7ad8bc8639f3a what seems to be out dated as we have done several overhauls in this area. (workbench refactor, overlay engine refactor, color management pipeline).
Changed status from 'Confirmed' to: 'Resolved'
Changed status from 'Resolved' to: 'Confirmed'
Reopening as this fix will be reverted. #81212 (Some Viewport Overlay is gone if you move the view in Cycles render view)
This issue was referenced by
32d4a67017
Changed status from 'Confirmed' to: 'Resolved'
Changed status from 'Resolved' to: 'Confirmed'
Added subscriber: @OtherRealms
A heads up, drawing images in POST_VIEW doesn't work at all in the 2.92 Image Editor, could this be related? I've tried various z positons without success in this case though it works fine in 2.91.
This issue was referenced by
89abc14d6c
Changed status from 'Confirmed' to: 'Resolved'