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

NaNs in 3D fonts? #19874

Closed
3 tasks done
greggman opened this issue Jul 19, 2020 · 1 comment · Fixed by #19884
Closed
3 tasks done

NaNs in 3D fonts? #19874

greggman opened this issue Jul 19, 2020 · 1 comment · Fixed by #19884
Labels

Comments

@greggman
Copy link
Contributor

greggman commented Jul 19, 2020

Description of the problem

This might not be a bug just passing it on.

I added checks for the data passed to bufferData and bufferSubData to the webgl helper I'm working on. If the data is a Float32Array then I check for NaN.

It found some NaNs are being passed for the font geometry in https://threejs.org/examples/webgl_camera_logarithmicdepthbuffer.html.

Three.js version
  • Dev
Browser
  • All of them
OS
  • All of them
@Mugen87 Mugen87 added the Addons label Jul 20, 2020
@Mugen87
Copy link
Collaborator

Mugen87 commented Jul 20, 2020

The NaN values are produces for the last two very large text geometries that have a scale of 1.135e21 and 9.46e23. BufferGeometry.computeVertexNormals() is not able to compute proper normal data and thus produces unusable values.

A simple fix is to remove the last two labels since they are not rendered correctly anyway. I don't think there is a sensible way to fix this in computeVertexNormals().

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

Successfully merging a pull request may close this issue.

2 participants