-
-
Notifications
You must be signed in to change notification settings - Fork 35.2k
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
BufferGeometry: Add ability to read interleaved data in computeVertexNormals(). #19600
Conversation
Should the title be In other words, is that an accurate description of what this is doing? |
First, I've hesitated a bit since I wanted to avoid confusion. The PR adds no real interleaved buffer support. Just the ability to read interleaved data by using the generic getter and setters from the |
I've slightly changed the title compared to yours since reading index data is now different, too. |
It seems to me you are supporting reading and setting (existing) interleaved data. Should the title be |
The problem is when the buffer attribute for normals needs to be created, data are not interleaved. normalAttribute = new BufferAttribute( new Float32Array( positionAttribute.count * 3 ), 3 ); It would only work for existing normals hence it's not a real support :(. |
Hmm, if this is not fixing it... wouldn't it be better to check if it's interleaved and log a warning that is not supported? |
@mrdoob He is fixing it. It is just that if the normal attribute does not exist, then non-interleaved normals are added. That is reasonable. |
Ah, I see! 👍 |
Thanks! |
From #18433. This modification helps to read interleaved data for normal computations. A new attribute is not interleaved however the method computes now data which are at least usable.