Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Normals wrong for spheres #197

Closed
ffreyer opened this issue Feb 27, 2020 · 0 comments · Fixed by #199
Closed

Normals wrong for spheres #197

ffreyer opened this issue Feb 27, 2020 · 0 comments · Fixed by #199

Comments

@ffreyer
Copy link
Contributor

ffreyer commented Feb 27, 2020

I noticed that the lighting of Spheres (or meshes thereof) in Makie is not smooth. It seems like this is because normals are not generated correctly. For example

using Makie, GeometryTypes
m = GLNormalMesh(Sphere(Point3f0(0), 1f0))
scene1 = mesh(m, color=:red)

# copy with normals = vertices
m = GLNormalMesh(vertices(m), GeometryTypes.faces(m), vertices(m), m.texturecoordinates, m.color, m.attributes, m.attribute_id)
scene2 = mesh(m, color=:red)

scene = vbox(scene1, scene2)

results in

sphere_test

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant