Support non-normalized, non-float vertex buffers and unaligned vertex buffers #1382
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a replacement for #1376. The original thinking was that we will promote the non-float attributes to float which was a complex and poor performance solution. The better solution is to change the shader to take non-float attributes. Fortunately, this shader processing is already happening for WebGPU on the JS side. @Popov72 factored out the shader processor on the JS side for WebGPU to also work with Babylon Native, which also includes code that aligns the buffers to 4-byte boundaries. This native PR ties everything together and removes all the promote to float logic we had earlier to try to handle non-float attributes.
This change includes updating Babylon.js to 7.7.2. Using an older version will result in a
console.error
if non-normalized, non-float vertex buffers are used.