Option for Interleaved Vertex Attributes
See original GitHub issueHaving interleaved vertex attributes is supported by glTF format. However, the exported doesn’t expose interleaving of attributes; it would be more performant to have attributes intersparsed. It’d be great to get an option to enable it if needed.
This would mean
- Making the interleaved array
- Giving the right
byteStride
for each attribute
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Vertex Specification Best Practices - OpenGL Wiki
(VNCVNCVNCVNC): Yet another approach is to interleave the vertex attributes for each vertex in a batch, and then store each of these ...
Read more >Storing vertex data: To interleave or not to ... - Anteru's Blog
When it comes to storing vertex data, there's basically two different schools of thought. One says interleave the attributes, that is, store “ ......
Read more >Vertex buffers - interleaved or separate? [closed]
I've recently implemented both versions in OpenGL (4.3) and using the (Crytek) Sponza scene as a test render scene, I had shaders that...
Read more >5.9 - Interleaved Buffers — LearnWebGL
Create a separate buffer object for each type of data, as was done in the previous lessons. Each vertex shader attribute variable is...
Read more >Add the option to interleave vertex data · Issue #1504 - GitHub
Is your feature request related to a problem? Please describe. Interleaving vertex data can be useful for ease of use and optimization (see ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There are some indirect benefits of interleaved vertex attributes, like minimizing the total number of WebGL buffers used for the scene (see this thread). But I don’t have real numbers on this, and would be very interested in a real comparison on modern graphics APIs.
But I think I’m inclined to agree that this is out of the scope that Blender’s exporter should need to deal with, and should be left to tools focused on glTF optimization (e.g. glTF-Pipeline, gltfpack, glTF-Transform, RapidCompact, …). Correct import/export in Blender is a big enough project.
Your original link is from 2013. Since then GPUs have gained more general caching systems that work more like on CPU, and with that, it’s pretty obvious that if you sometimes need to access one of the vertex streams separately, as with Z-prepass or shadow map rendering where you only use position, it’ll be better to have them separate, otherwise when doing so the GPU will load lots of irrelevant data into the cache.
Depending on attribute usage patterns, the optimum can even be to have positions separate and everything else interleaved, but the wins either way are very small.
This is all kind of received knowledge in the graphics community, not so easy to find good references, but there’s this from 2016:
https://anteru.net/blog/2016/storing-vertex-data-to-interleave-or-not-to-interleave/
ARM actually recommends mixed deinterleave: https://developer.arm.com/solutions/graphics-and-gaming/developer-guides/learn-the-basics/the-bifrost-shader-core/index-driven-geometry-pipeline
Anyway, again, it’s generally not what’s gonna be your bottleneck these days.