Skip to content
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

Vertex normals #17

Closed
kylebarron opened this issue Jun 14, 2020 · 1 comment
Closed

Vertex normals #17

kylebarron opened this issue Jun 14, 2020 · 1 comment

Comments

@kylebarron
Copy link
Owner

Optionally compute vertex normals extension. There's two parts:

Normal Generation

Based on the quantized-mesh-tile implementation, essentially for every vertex you look at all the triangles that touch it. For each triangle, compute its normal, and then average the normals of the touching triangles to find each per-vertex normal.

I think that to make it performant, you'd want to first compute all the normals of the triangles. And then you can use that array of normals somehow as a lookup table, so that you can find all the triangles per vertex at once, and then average within the axis...

Normal Encoding

Quantizing and encoding each x, y, z 96-bit floating point unit vector into an x,y 16-bit representation.

References

@kylebarron
Copy link
Owner Author

Closed by #35 and #18

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

No branches or pull requests

1 participant