Using float64 with Makie attribute 'shininess' gives error

Hi,

Since the update to Makie 0.24, shininess appears to require floats (Float32).

For Makie 0.23 GLMakie supported doubles (Float64), but CairoMakie did not (for default versions of the backends). Now neither supports Float64.

I can of course use Float32 for this specific attribute for now, but I guess that should not be needed long-term.

GLMakie:

julia> meshscatter!(Point3(0.,0.,0.), marker = Sphere(Point3f(0, 0, 0), 0.5), shininess = 50.)
ERROR: shininess in uniforms is a banned type: Float64
...

Packages:

(jl_CK44Hd) pkg> st
Status `/private/var/folders/0l/8dbr8drn1n5176ph_4q8jkjr0000gp/T/jl_CK44Hd/Project.toml`
  [e9467ef8] GLMakie v0.13.1
⌅ [ee78f7c6] Makie v0.24.1

Julia version:

julia> versioninfo()
Julia Version 1.11.5
Commit 760b2e5b739 (2025-04-14 06:53 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin24.0.0)
  CPU: 10 × Apple M1 Max
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, apple-m1)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)
Environment:
  JULIA_EDITOR = code -g

Thanks in advance for considering this!

oh, that means there’s a convert_attribute(shininess, ::key"shininess") = Float32(shininess) missing.
Would you be able to PR this and add a test checking for plot.shininess[]::Float32?

Looking at how backlight is handled with respect to types, I added

convert_attribute(value, ::key"shininess") = Float32(value)

in conversions.jl, which seems to make it work.

Would that be the way to fix the issue?

1 Like

Yes! That looks correct!

1 Like