-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce cone primitive #83
Conversation
Ah OK I think I know what's going on and it's my fault - currently For cones we will have to add some sort of proper normal transformation code. I'll probably put in something fairly specialized right now so we can get cones working without introducing the overhead of computing inverse transpose matrices all over the place, but ultimately I would like to support non-uniform mesh scaling (#54) and so we will need to figure out an efficient general-purpose solution. |
As a separate point, note that |
Yeah, the origin of a cone is in the bottom, that is why it is already hanging in the air.
Once replaced with |
Yup, figured that issue would just go away once the proper cone shape is in, but felt I should point it out anyways just in case you were wondering yourself what was going on 🙂 I'll take some time this weekend to figure out a solution to the non-uniform scaling of normals problem. |
Will be necessary for rendering cones (#83)
@ianmackenzie I think this is ready now! |
Made a couple very minor tweaks, but I think this looks good! |
This is work in progress, for now I'm rendering Cylinder3d as a cone because it is difficult to integrate with local elm-geometry.
The Cone3d type is introduced in this pr.
After changing
Demo.elm
to render the cone, I got a weird shadow on the cone, that looks different for the cylinder.