GL_BLEND ignores texture alpha channel #79491
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#79491
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: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 860M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 436.48
Blender Version
Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-08-03 05:14, hash:
144f780c71
Worked: 2.83
Short description of error
Using
bgl.glEnable(bgl.GL_BLEND)
in 2.91 and 2.90 with image shader has no effect on alpha channel display.Exact steps for others to reproduce the error
gl_blend.blend
Added subscriber: @MikhailRachinskiy
Added subscriber: @lichtwerk
Changed status from 'Needs Triage' to: 'Confirmed'
Confirmed, checking...
Added subscribers: @JacquesLucke, @ideasman42
This changed in
cfa788cf9a
.Seems like you need an additional call with something like
prior to calling your
I assume this is not a bug, but maybe @JacquesLucke or @ideasman42 have an opinion?
Thanks, it does fix the issue, but it violates OpenGL spec , where it says
glClearColor
has to be initialized with 0.And if it's not a bug, then it better be mentioned in Python API section of 2.90 release notes.
Added subscribers: @christian.rauch, @brecht, @EAW
Reading D7599: correctly draw UI with enabled alpha channel, it seems possible that
cfa788cf9a
was committed based upon a miscommunication/misunderstanding.So there was a bug with alpha handling
1: only in a specific version of a driver, and
2: only on a specific GPUs, while
3: only using a specific Windowing system (Wayland),
4: That had already been fixed upstream.
It was designed to be temporary until the fixed driver in Ubuntu 20.4.1 is released, which will be on August 6 2020.
It seems that @christian.rauch wanted to change the Blender UI handling of alpha to be initialized to 1.0f on Wayland, but instead that change was committed in a way that affects Blender on all systems. It wasn't
#ifdef
ed.@brecht did sign off on the "other clear color changes," but it isn't clear (pun unavoidable😉) whether he thought they were suppose to be only for Wayland or the entire code base.
I am curious as to how the rest of the window managers handle UI drawing since
glClearColor
initializing alpha to 0.0 has been in the code since before 2.5 (see line 213).I just realized your example @MikhailRachinskiy is from Blender's API documentation. https://docs.blender.org/api/master/gpu.html#generate-a-texture-using-offscreen-rendering
So if this change was intentional, that would need to be updated too.
Changed status from 'Confirmed' to: 'Archived'
If you call
glClear
withoutglClearColor
, that is a bug in the Python script. The Python API makes no guarantee that all OpenGL state is set to defaults when Python scripts are executed.This issue was referenced by
229fe01a15
Maybe I can clear up some misconceptions around the UI alpha channel to avoid confusion for future issues referring to this.
There are two dependant issues, which are reflected by the two commits in https://developer.blender.org/D7599:
There was a bug with the buffer format selection on Wayland for a specific Intel GPU driver (point 1). This is not related to the alpha channel (point 2). While the Wayland bugfix (1) would be obsolete for users of never
iris
drivers, the alpha channel bug (2) will be present for any system that enables the alpha channel in the OpenGL configuration.No, I wanted the alpha to be correctly initialised to 1.0 for all OpenGL configurations on EGL, GLX, WGL, CGL (point 2). An
#ifdef
just for Wayland does not make sense, since all other OpenGL configurations would still suffer from transparent UI elements with alpha channel.An old bug is still a bug :-) It may be that this issue did not show before, since you will only see transparent windows with more modern window compositors.