Makie.jl icon indicating copy to clipboard operation
Makie.jl copied to clipboard

regression: FastPixel() doesn't work anymore

Open aplavin opened this issue 1 year ago • 10 comments

julia> using GLMakie
julia> scatter(rand(10^5), marker=FastPixel())

gives an empty plot: image 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

aplavin avatar Aug 27 '24 14:08 aplavin

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...

SimonDanisch avatar Aug 27 '24 15:08 SimonDanisch

You can also try: ENV["MODERNGL_DEBUGGING"] = "true"; Pkg.build("ModernGL")

SimonDanisch avatar Aug 27 '24 15:08 SimonDanisch

No error, neither from the plot nor from ModernGL rebuild.

aplavin avatar Aug 27 '24 15:08 aplavin

nor from ModernGL rebuild.

Did you run the example after rebuilding and reloading ModernGL & GLMakie?

SimonDanisch avatar Aug 27 '24 15:08 SimonDanisch

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.

SimonDanisch avatar Aug 27 '24 15:08 SimonDanisch

The plot looks the same if I set gl_PointSize=10 in the shader. Screenshot 2024-08-27 at 1 46 38 PM

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.

asinghvi17 avatar Aug 27 '24 20:08 asinghvi17

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 🤷

SimonDanisch avatar Aug 27 '24 22:08 SimonDanisch

Potentially related - https://github.com/bkaradzic/bgfx/issues/2822

asinghvi17 avatar Aug 27 '24 22:08 asinghvi17

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.

aplavin avatar Oct 11 '24 17:10 aplavin

I guess we could do something like marker = isosx() && marker isa FastPixel ? Rect : marker somewhere in drawing_primitives.jl.

SimonDanisch avatar Oct 11 '24 17:10 SimonDanisch