Interleaving involves consolidating data into a single VBO instead of using multiple buffers. By mixing the data together within one buffer, you can combine attributes like vertex positions and colors into a single stream, improving efficiency with different pointers for each type of data.
The advantages and potential drawbacks of this technique are still unclear to me, and I am seeking insights from more experienced individuals. It is uncertain how mixing types, such as adjusting precision for texture coordinates, would impact performance or if it is considered best practice.
However, one downside could be complicating loops that update specific attributes like positions without affecting others, such as colors, due to the interleaved nature of the data.
Instancing refers to utilizing a single attribute across multiple instances of geometry.
For example, you could define a cube with 24 vertices in one attribute, along with corresponding normals and indices. To position these cubes individually, you can manipulate a uniform variable that modifies the position attribute accordingly.
If you want to render numerous instances of a cube at unique positions, you can issue draw calls with the same attributes but vary the position uniform each time to achieve the desired placement.
To optimize rendering multiple instances efficiently, you can introduce an instance attribute containing positions for each individual instance, allowing you to draw all instances simultaneously within a single call. This eliminates the need for position uniforms and introduces additional attributes for managing complex instances like turning points into cubes.