2.8x, unreliable GL_LINE_SMOOTH / GL_POLYGON_SMOOTH behavior #57570
Closed
opened 2018-11-01 23:02:21 +01:00 by Campbell Barton
·
61 comments
No Branch/Tag Specified
main
blender-v3.6-release
blender-v4.2-release
blender-v4.4-release
manifold
npr-prototype
remote-asset-library-monolithic
blender-v4.3-release
temp-sculpt-dyntopo
blender-v3.3-release
brush-assets-project
pr-extensions-tidy-space
blender-v4.0-release
universal-scene-description
blender-v4.1-release
blender-v3.6-temp_wmoss_animrig_public
gpencil-next
blender-projects-basics
sculpt-blender
asset-browser-frontend-split
asset-shelf
blender-v3.5-release
blender-v2.93-release
sculpt-dev
bevelv2
xr-dev
v4.4.0
v4.2.8
v4.2.7
v3.6.21
v4.2.6
v3.6.20
v4.2.5
v3.6.19
v4.3.2
v4.3.1
v4.3.0
v4.2.4
v3.6.18
v4.2.3
v3.6.17
v4.2.2
v3.6.16
v4.2.1
v3.6.15
v4.2.0
v3.6.14
v3.3.21
v3.6.13
v3.3.20
v3.6.12
v3.3.19
v4.1.1
v3.6.11
v3.3.18
v4.1.0
v3.3.17
v3.6.10
v3.6.9
v3.3.16
v3.6.8
v3.6.7
v3.3.14
v4.0.2
v4.0.1
v4.0.0
v3.6.5
v3.3.12
v3.6.4
v3.6.3
v3.3.11
v3.6.2
v3.3.10
v3.6.1
v3.3.9
v3.6.0
v3.3.8
v3.3.7
v2.93.18
v3.5.1
v3.3.6
v2.93.17
v3.5.0
v2.93.16
v3.3.5
v3.3.4
v2.93.15
v2.93.14
v3.3.3
v2.93.13
v2.93.12
v3.4.1
v3.3.2
v3.4.0
v3.3.1
v2.93.11
v3.3.0
v3.2.2
v2.93.10
v3.2.1
v3.2.0
v2.83.20
v2.93.9
v3.1.2
v3.1.1
v3.1.0
v2.83.19
v2.93.8
v3.0.1
v2.93.7
v3.0.0
v2.93.6
v2.93.5
v2.83.18
v2.93.4
v2.93.3
v2.83.17
v2.93.2
v2.93.1
v2.83.16
v2.93.0
v2.83.15
v2.83.14
v2.83.13
v2.92.0
v2.83.12
v2.91.2
v2.83.10
v2.91.0
v2.83.9
v2.83.8
v2.83.7
v2.90.1
v2.83.6.1
v2.83.6
v2.90.0
v2.83.5
v2.83.4
v2.83.3
v2.83.2
v2.83.1
v2.83
v2.82a
v2.82
v2.81a
v2.81
v2.80
v2.80-rc3
v2.80-rc2
v2.80-rc1
v2.79b
v2.79a
v2.79
v2.79-rc2
v2.79-rc1
v2.78c
v2.78b
v2.78a
v2.78
v2.78-rc2
v2.78-rc1
v2.77a
v2.77
v2.77-rc2
v2.77-rc1
v2.76b
v2.76a
v2.76
v2.76-rc3
v2.76-rc2
v2.76-rc1
v2.75a
v2.75
v2.75-rc2
v2.75-rc1
v2.74
v2.74-rc4
v2.74-rc3
v2.74-rc2
v2.74-rc1
v2.73a
v2.73
v2.73-rc1
v2.72b
2.72b
v2.72a
v2.72
v2.72-rc1
v2.71
v2.71-rc2
v2.71-rc1
v2.70a
v2.70
v2.70-rc2
v2.70-rc
v2.69
v2.68a
v2.68
v2.67b
v2.67a
v2.67
v2.66a
v2.66
v2.65a
v2.65
v2.64a
v2.64
v2.63a
v2.63
v2.61
v2.60a
v2.60
v2.59
v2.58a
v2.58
v2.57b
v2.57a
v2.57
v2.56a
v2.56
v2.55
v2.54
v2.53
v2.52
v2.51
v2.50
v2.49b
v2.49a
v2.49
v2.48a
v2.48
v2.47
v2.46
v2.45
v2.44
v2.43
v2.42a
v2.42
v2.41
v2.40
v2.37a
v2.37
v2.36
v2.35a
v2.35
v2.34
v2.33a
v2.33
v2.32
v2.31a
v2.31
v2.30
v2.28c
v2.28a
v2.28
v2.27
v2.26
v2.25
Labels
Clear labels
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Asset datablocks, libraries, browser and shelf
Interest
Audio
Interest
Automated Testing
Interest
BlendFile
Interest
Blender Asset Bundle
Interest
Code Documentation
Code comments, Python/RNA API descriptions
Interest
Collada
Interest
Compatibility
Backward and forward compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
FBX
FBX I/O related topics
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 & IO
Interest
Platforms & Builds
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
USD
Interest
UV Editing
Interest
Undo
Interest
User Interface
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Wayland windowing on Unix
Interest
Workbench
Interest
glTF
glTF format I/O topics
Interest: X11
Xorg/X11 windowing
Legacy
Asset Browser Project
Archived
Legacy
Blender 2.8 Project
Archived
Legacy
Milestone 1: Basic, Local Asset Browser
Archived
Legacy
OpenGL Error
Archived
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Related to security, see policy: https://developer.blender.org/docs/handbook/bug_reports/vulnerability_reports/
Module
Animation & Rigging
Module
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms & Builds
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
Windows
Platform
macOS
Severity
High
Severity
Low
Severity
Normal
Severity
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
Archived
Type
Report
Archived
Type
To Do
Milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
Hoshinova
James-McCarthy-4
Sebastian-Herholz
casey-bianco-davis
gandalf3
Blendify Aaron Carlisle
quantimoney Aditya Y Jeppu
Alaska Alaska
angavrilov Alexander Gavrilov
frogstomp Aleš Jelovčan
amelief Amélie Fondevilla
elubie Andrea Weikert
Andy_Goralczyk Andy Goralczyk
ankitm Ankit Meel
Anthony-Roberts Anthony Roberts
antoniov Antonio Vazquez
aras_p Aras Pranckevicius
Arnd Arnd Marijnissen
bartvdbraak Bart van der Braak
mont29 Bastien Montagne
blender-bot Blender Bot
bnagirniak Bogdan Nagirniak
BClark Brad Clark
brecht Brecht Van Lommel
BrianSavery Brian Savery (AMD)
ideasman42 Campbell Barton
CharlesWardlaw Charles Wardlaw
CharlieJolly Charlie Jolly
Chris_Blackbourn Chris Blackbourn
lateasusual Chris Clyne (Lateasusual)
ChrisLend Christoph Lendenfeld
HobbesOS Cian Jinks
fclem Clément Foucault
cmbasnett Colin Basnett
Kdaf Colin Marmond
dfelinto Dalai Felinto
pioverfour Damien Picard
DanielBystedt Daniel Bystedt
pepe-school-land Daniel Martinez Lara
zanqdo Daniel Salazar
Mets Demeter Dzadik
erik85 Erik Abrahamsson
EAW Evan Wilson
filedescriptor Falk David
fsiddi Francesco Siddi
GaiaClary Gaia Clary
DagerD Georgiy Markelov
mano-wii Germano Cavalcante
zazizizou Habib Gahbiche
HooglyBoogly Hans Goudey
Harley Harley Acheson
weasel Henrik D.
Hjalti Hjalti Hjálmarsson
howardt Howard Trickey
nirved-1 Hristo Gueorguiev
mod_moder Iliya Katushenock
brita Inês Almeida
JacquesLucke Jacques Lucke
Jason-Fielder Jason Fielder
JasonSchleifer Jason schleifer
Jebbly Jeffrey Liu
Jeroen-Bakker Jeroen Bakker
deadpin Jesse Yurkovich
neXyon Joerg Mueller
eliphaz John Kiril Swenson
guitargeek Johnny Matthews
Brainzman Jonas Holzman
JoniMercado Jonatan Mercado
JorgeBernalMartinez Jorge Bernal
JosephEagar Joseph Eagar
JoshuaLeung Joshua Leung
Bone-Studio Juan Gea
jpbouza-4 Juan Pablo Bouza
JulianEisel Julian Eisel
JulienDuroure Julien Duroure
JulienKaspar Julien Kaspar
kevindietrich Kévin Dietrich
lone_noel Leon Schittek
LucianoMunoz Luciano Muñoz Sessarego
LukasStockner Lukas Stockner
LukasTonne Lukas Tönne
LunaRood Luna Rood
MaiLavelle Mai Lavelle
EosFoxx Marion Stalke
Baardaap Martijn Versteegh
scorpion81 Martin Felke
mendio Matias Mendiola
Matt-McLin Matt McLin
MetinSeven Metin Seven
wave Michael B Johnson
Michael-Jones Michael Jones (Apple)
makowalski Michael Kowalski
pragma37 Miguel Pozo
nrupsis Nate Rupsis
jesterking Nathan Letwory
nathanvegdahl Nathan Vegdahl
PrototypeNM1 Nicholas Rishel
nickberckley Nika Kutsniashvili
Sirgienko Nikita Sirgienko
OmarEmaraDev Omar Emara
pablovazquez Pablo Vazquez
PaoloAcampora Paolo Acampora
PascalSchon Pascal Schön
pmoursnv Patrick Mours
muxed-reality Peter Kim
lichtwerk Philipp Oeser
P2design Pierrick PICAUT
PratikPB2123 Pratik Borhade
Limarest Ramil Roosileht
farsthary Raul Fernandez Hernandez
LazyDodo Ray molenkamp
iss Richard Antalik
rjg Robert Guetzkow
salipour Sahar A. Kashi
Sayak-Biswas Sayak Biswas
Sean-Kim Sean Kim
sherholz Sebastian Herholz
sebastian_k Sebastian Koenig
ZedDB Sebastian Parborg
sebbas Sebastián Barschkis
Sergey Sergey Sharybin
IRIEShinsuke Shinsuke Irie
sidd017 Siddhartha Jejurkar
SietseB Sietse Brouwer
SimonThommes Simon Thommes
SonnyCampbell_Unity Sonny Campbell
Stefan_Werner Stefan Werner
Lockal Sv. Lockal
dr.sybren Sybren A. Stüvel
ThomasDinges Thomas Dinges
Ton Ton Roosendaal
BassamKurdali Ursula kurdali
Vasyl-Pidhirskyi Vasyl Pidhirskyi
WannesMalfait Wannes Malfait
wbmoss_dev Wayde Moss
weizhen Weizhen Huang
leesonw William Leeson
xavierh Xavier Hallade
jenkm Yevgeny Makarov
ChengduLittleA YimingWu
gfxcoder jon denning
Clear assignees
No Assignees
Clément Foucault
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#57570
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "%!s()"
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?
For some graphics cards in 2.8x (more information needed), smoothing is ignored. This task is to gather more information and see if it can be resolved.
See: #54723#548752 and replies.
Edit, it seems some graphics cards simply ignore the smooth setting.
Added subscriber: @ideasman42
blender/blender-addons#78268 was marked as duplicate of this issue
#74366 was marked as duplicate of this issue
#63088 was marked as duplicate of this issue
#73560 was marked as duplicate of this issue
#65018 was marked as duplicate of this issue
#57993 was marked as duplicate of this issue
Added subscriber: @pablovazquez
Can confirm anti-alias works fine (and has been since the beginning) in the following setup:
OS: Ubuntu 17.10
**Graphics Card:**Nvidia GTX 1050
**Resolution:**2560x1440
**Blender UI Line Width:**Auto (picks "Thin")
Added subscriber: @Lapineige
It works fine on my setup too.
OS: Ubuntu 18.10
Graphics Card: Nvidia GTX 880m (Nvidia Drivers used)
Resolution: 1920*1080 (17" screen, not HDPi)
Blender UI Line Width: Auto (picks "Thin")
Added subscribers: @fclem, @Sergey
@ideasman42 , this is a misuse of core profile from Blender side. Not sure where exactly this gizmo is being drawn, but from quick grep in the source shows two common mistakes:
glLineWidth()
with values greater that1.0
. As per specification thisINVALID_VALUE
.I am a strong believer in theory that in 2.8 we should not use deprecated/known-to-behave-bad OpenGL features. With Core profile we've got flexibility of programmable render pipeline, where we can implement smooth line which will be guaranteed to work the way we want on all the hardware.
P.S. Maybe @fclem can drop his knowledge here as well.
Well this is partially true. The values supported are implementation dependent.
I was the one who added line smoothing to gizmos because the aliasing caused by wide lines was terrible. So it's better than nothing.
Correctly implementing smooth wide lines needs to have a dedicated shader for it that just mimics the behavior of old GL_LINE_SMOOTH. This shouldn't be too hard but I don't know how feasible it is for 2.80.
As for GL_POLYGON_SMOOTH this is even more tricky. Since it's mostly for UI stuff, I would suggest to just draw alpha blended shapes with manual added geometry on the contours of the shape and just make the outer ring alpha = 0.0 so that vertex color interpolation make some kind of smoothing.
If it is large points that you want to draw (larger than max gl point size), we can make a shader variation that draws a AA point and you just have to submit a quad.
Could we have a general solution for this?
We want add-on authors to be able to make their own gizmos, so if they need to be aware of special shader internals - it could make the API hard to use (maybe this can be hidden from the developer?).
Possible alternatives...
GL_POLYGON_SMOOTH
whenalpha < 1.0
), disadvantage of having to use multi-sample buffer which needs special handling (perhaps this isn't practical if we want to occlude gizmos by other elements in the scene).GL_LINE_SMOOTH / GL_POLYGON_SMOOTH
at all.Added subscriber: @chaos-4
Didn't find any other appropriate place to ask this, but what is the proper way to add antialiasing to custom gizmos?
I'm currently writing my own gizmos for addons, but couldn't find any dedicated property to enable or disable the antialiasing. I'm also interested in the way points are drawn in the 3D view, as these can be square or round.
There isn't a a convenient way to do this at the moment, that's why this task is still open.
Round points are currently drawn as either small circles or using shaders.
Thanks Campbell.
Looking forward for possible solutions on this.
This is really problematic for OSX users on retina display.
Possible workaround is to use a geometry shader variant for every common shader and switch the shader just before drawing if we are drawing a line.
The issue is that if we do that we loose the uniforms configuration because they were changed for another shader. And there is no way to know what type of primitive the shader will be drawn with until the moment the drawcall is issued.
So the real fix would be to change every places that draw thick lines to use a special shader(s) explicitly and pass the line width as uniform.
I wouldn't consider this high priority for 2.80 release as this fix requires some thinking and maybe deeper change.
Added subscribers: @Kent-Davis, @Morganil, @ChristopherAnderssarian, @WilliamReynish, @lichtwerk, @antoniov
Added subscriber: @Uendel
Added subscriber: @AndreasAsanger
Is there a chance for a fix anytime soon?
When working in the viewport, I'd agree calling those thin lines a discomfort.
But when you need to create screenshots for printing purposes, this is a real problem...
Do not go together Ubuntu and Macintosh. Please do separate. Only for Macintosh. Do not use Windows, Do not use Ubuntu.
Added subscriber: @MariusGiurgi
How come this is marked as a LOW priority? The annotations are useless without proper thickness. I’m running Blender 2.81 on Mojave 10.14.6 on a MacBook pro 15” 2018 and the annotations are 1px thick regardless of the line thickness settings.
I am use Macintosh.
Yes I told Blender report ticket many times make me frustrate. Blender 2.79b is perfect but 2.80 and up mess up. They need to fix I ask Blender company again.
Just to give an update, the 2.82 beta will have a fix for wide line in the viewport tomorrow. (See
014eb69cf8
)This won't fix the issue for transform gizmos, or the UI. So I'll keep the report open. Do note I have plans for fixing it for UI and gizmos but it's not decided when I'll have time to tackle it.
Thanks
FYI, this still doesn’t work in 2.82 alpha experimental builds (on macOS). Perhaps because the experimental builds are not yet beta?

Added subscriber: @rjg
@MariusGiurgi Seems to only affect macOS in this case as well. It works properly on Windows and Linux.
Oh well please do it work on MacOS some one who work on Blender 2.8x support DO IT
@MariusGiurgi I can't see aliasing in your screenshot. Can you double check that your viewport settings (in user preferences) have
Overlay Smooth Wires
enabled?Where is "User Preferences" I not see. Everyone use Blender 2.82 Alpha.
Added subscribers: @iss, @jenkm, @cubimation, @QuentinG
Added subscribers: @Memento, @Jeroen-Bakker, @Ton, @ZedDB
Added subscriber: @KBrumfield
Added subscriber: @Imaginer
Added subscriber: @LeoSch
Added subscriber: @raincole
The problem is still here with Blender v2.82a and macOS 10.14. It's sad to see such a major UI issue is marked as "low priority".
Any update on this? FYI, drawing errors with
GL_LINE_SMOOTH
andGL_POLYGON_SMOOTH
also affect custom drawing in operators.Added subscriber: @fsiddi
After reporting the issue again in a new task, I've been pointed to this task. So i'll briefly reiterate. On macOS:
I think this a regression since Blender 2.79. Can @fclem or @ideasman42 confirm if this will be addressed for Blender 2.83?
Yes I agree with you. Blender 2.8x need to fix everything I am still wait for Blender developer to fix everything.
I do use MacOS Catalina 10.15.4 beta.
I have low vision I unable to read too thinner line (wire) as well. Please copy from Blender 2.79b to paste to 2.80 so can read thickness wire.
Added subscriber: @ankyankyanky
Added subscriber: @Filemoner
Low priority, this, really?
2.9 alpha and still unusable in OSX :(
This issue was referenced by
d712f1f83a
Changed status from 'Confirmed' to: 'Resolved'
See picture
@Kent-Davis I've fixed the issue you were pointing at in
42d77fbea1
@fclem

I am sorry I disagree with you they did not fix yet timeline. I am going show you proof.
Added subscriber: @FSam
I think this task was marked as "Resolved" automatically and should be re-opened.
The problem has only been fixed in some places out of many.
Added subscriber: @neo_phi
Still getting unusable hairline annotation lines in Blender 2.83LTS on OSX 10.15.5. Other issues regarding this direct to here and this is closed...
@neo_phi look at Blender 2.90 Alpha let you check.
https://builder.blender.org/download/
You will see. Blender 2.80 is no long to fix only Blender 2.90 Alpha.
@neo_phi
Blender 2.90 Alpha
Touch enlarge picture you can see.
Look at picture