Iron Tiger
Regular
Except the Xenos can't create geometry.Jawed said:I find the digit-life discussion of vertices->geometry-shader->stream-output extremely interesting. As far as I can tell it precisely describes Xenos, MEMEXPORT included.
The usual stage of a vertex shader is followed by geometry shader. What is it? It's a shader that manages triangles (assembled from vertices) as entities before they are drawn. That is it can manipulate triangles as objects. Including some control or additional vertex parameters. It can change these parameters, calculate new parameters, specific for the triangle as a whole, and then pass them to a pixel shader. It can mark a triangle with a predicate (and then process it differently, depending on the predicate value), or exclude it from candidates to be drawn. Unfortunately, this shader unexpectedly cannot create new geometry and new triangles at its output, but it's followed by another new stage — Stream Out.
At last it's officially possible to return the data, which was processed in the vertex part of the pipeline, to the buffer (memory) before it's passed and drawn in the pixel section. Then it can again be used for choice. Thus, it allows a lot of things that were previously impossible or very hard to implement. For example, you can now generate new geometry and tessellate surfaces to a greater multiple quantity of triangles by this or that algorithm. In order to do it, you should use two passes in the vertex section, where the first one exports the data stream and stream division coefficients between them (you may remember that DX 9c allowed to set a divider for vertex indices when they were assembled from several independent streams, one for each stream). It's a tad less natural than just generating new vertices and new geometry in a vertex shader, but finally this option has become available. You can even route the data in the output -> input cycle and use predicates to sample and degrade geometry in cycle to simplify a model, for example.
Thus, the importance of exporting data from the middle of the pipeline can scarcely be exaggerated. Interestingly, this data can be then interpreted not only as vertices, bus also as textures or other data structures. It means that procedural textures can be generated fast on the hardware level and then their generated representation can be used without extra delays for constant calculations.
Jawed