MakieOrg / Makie.jl

Interactive data visualizations and plotting in Julia
https://docs.makie.org/stable
MIT License
2.37k stars 302 forks source link

Translated plots are bouncing around on Macs #4022

Closed asinghvi17 closed 1 month ago

asinghvi17 commented 1 month ago
using GLMakie

f, a, p = linesegments(rand(2));

translate!(p, 661000, 661000, 0)
# scale!(p, 2, 2, 1)
f # this is a problem

# investigation code
Makie.update_state_before_display!(f)
f
notify(p[1])
Makie.patch_model(a.scene.float32convert.scaling[], p.model[])

f2, a2, p2 = linesegments(rand(Point2{Float64}, 2) .+ Point2{Float64}(661000, 661000)) # works fine
asinghvi17 commented 1 month ago

Per conversation with @ffreyer, this is because the model matrix is not Float32-corrected. This may mean that the model matrix has to be applied on the CPU, while data are in Float64 form, pre conversion and transfer to GPU.