GeometryBasics.jl
GeometryBasics.jl copied to clipboard
fix Rect3 uv coordinates
The current uv's in Rect3 are just the xy components of the coordinates. That means uvs are doubly assigned and not normalized. This pr adds some manual uvs so that
img = [
RGBf(1,0,0) RGBf(0,1,0) RGBf(0,0,1);
RGBf(0,1,1) RGBf(1,0,1) RGBf(1,1,0);
]
colors a cube. (Colors applying to the [+x, +y, +z; -x, -y, -z]
face.)
and not normalized.
They should be since I'm using the unit cube, no? Also, they need to return Vec3s, to work with 3d uvw coordinates...
They should be since I'm using the unit cube, no?
Oh, you're right.
Also, they need to return Vec3s, to work with 3d uvw coordinates...
Why do we need 3d uvw coordinates though? From what I've seen working with 2d uv coordinates is much more common. Makie also doesn't accept 3d textures, e.g. mesh(Rect3f(Point3f(0), Vec3f(1)), color = rand(RGBf, 2, 2, 2))
errors. So you can't use them there.
For volumes and for https://github.com/MakieOrg/Makie.jl/pull/2274
Isn't it much more common to texture a surface than a volume though?