Implementing programmable vertex pulling
The concept of programmable vertex pulling (PVP) was proposed in an article called Introducing the Programmable Vertex Pulling Rendering Pipeline by Daniel Rákos, published in the amazing book OpenGL Insights in 2012. The article delves into the GPU architecture of that era and explains why this data storage approach was advantageous. Initially, vertex pulling involved storing vertex data in one-dimensional buffer textures.
Instead of setting up traditional vertex input bindings, data was accessed using texelFetch()
and the GLSL samplerBuffer
in the vertex shader. The built-in OpenGL GLSL variable gl_VertexID
was used as an index to calculate texture coordinates for texel fetching. This technique emerged as a solution to CPU bottlenecks caused by numerous draw calls. By combining multiple meshes into a single buffer and rendering them with a single draw call, developers could avoid rebinding vertex arrays or buffer objects, significantly...