The input assembler is responsible for resolving the index buffer and for initiating the subsequent processing of vertices.Īn obvious way of implementing vertex reuse in the input assembler would be to run a vertex shader instance for every vertex in the vertex buffer and store the transformed vertex. As the input mesh uses an index buffer, the same benefits of reusing vertices should also apply here and reduce the overall number of potentially costly vertex shading operations. The geometry and tessellation shader stages will be covered in a later blog post.įor each vertex that is referenced by an index buffer, the GPU needs to run a vertex shader instance to transform the vertex from its input layout of the vertex buffer(s) to a position in clip-space. ![]() ![]() The Geometry Shader operates on point, line, or triangle primitives and can itself generate one or more primitives.Ī vertex shader is required in every geometry pipeline.įor simplicity, in this first blog post, we will only look at how vertex shaders map to our RDNA™ hardware.Together with the hull shader, they represent the programmable stages of hardware tessellation. The Domain Shader processes samples in a one- or two dimensional domain.Likewise, the Hull Shader operates on control vertices of higher order control patches.Each vertex shader instance processes a single vertex, only. The Vertex Shader transforms the incoming data from the vertex buffer(s) either for rasterization or for further processing by any of the following processing stages.For the purpose of comparing mesh shaders to the vertex pipeline, we will only focus on the latter indexed vertex shading.Īs an example, we will use the following index and vertex buffer and follow the first four triangles through the GPU to the rasterizer.īefore these primitives can be rasterized and shaded, they pass through the Input Assembler and a programmable geometry pipeline comprised of up to four different shaders. To reduce data duplication, an optional index buffer can be used to define triangles as a set of three indices, with each index referencing a different vertex. To appreciate the flexibility and potential performance gains of the mesh shader pipeline, it might be helpful to look at how the GPU processes traditional draw calls using a combination of vertex and index buffers.įor traditional graphics pipelines, a mesh is commonly defined as a set of vertices with each triplet of consecutive vertices forming a triangle. ![]() In this article, we start this series by motivating the evolution from a vertex-shader based pipeline towards mesh shading.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |