Makie.jl
Makie.jl copied to clipboard
regression: FastPixel() doesn't work anymore
julia> using GLMakie
julia> scatter(rand(10^5), marker=FastPixel())
gives an empty plot:
While it certainly worked before.
- [x] what version of Makie are you running? (
]st -m Makie) v0.21.9 - [x] can you reproduce the bug with a fresh environment ? (
]activate --temp; add Makie) - [x] What platform + GPU are you on? macbook air m2
Sigh, this must be Apple doing something weird - since we actually fixed FastPixel in the new version. Is there any error or anything in the terminal? This works on windows, linux CI, nvidia and AMD...
You can also try: ENV["MODERNGL_DEBUGGING"] = "true"; Pkg.build("ModernGL")
No error, neither from the plot nor from ModernGL rebuild.
nor from ModernGL rebuild.
Did you run the example after rebuilding and reloading ModernGL & GLMakie?
I dont have a mac, so I cant debug it, but if you have a second you could play around with the shader and maybe narrow down the problem:
https://github.com/MakieOrg/Makie.jl/blob/master/GLMakie/assets/shader/dots.vert#L58-L77
I'd start by removing the if (markerspace ==0) and setting gl_PointSize = 10 instead to get an idea what's broken.
You need GLMakie.closeall() after each shader change.
The plot looks the same if I set gl_PointSize=10 in the shader.
Setting it to any other number (1, 30, 100) also doesn't change anything.
The example scatter(rand(10^5), rand(10^5); marker = FastPixel()) is also just a blank Axis.
Even scatter(rand(10), rand(10); marker = FastPixel()) does not display anything.
Jeez, than gl_PointSize must simply be broken on OSX, I'd say... No idea what else should be the take away here. It's a pretty old feature, maybe they simply dont test it 🤷
Potentially related - https://github.com/bkaradzic/bgfx/issues/2822
Maybe, in the meanwhile while there's no proper fix, FastPixel should just fallback to any other single-pixel marker (whichever is fastest)? I already saw quite some scripts from older Makie versions that just show empty plots now. At least on macos.
I guess we could do something like marker = isosx() && marker isa FastPixel ? Rect : marker somewhere in drawing_primitives.jl.