I'm learning about the graphics pipeline. As I understand it, you feed it collections of vertices, edges, faces etc (aka meshes). After the vertex shader comes the primitive/shape assembly stage. What is the point of that process though, what is it actually doing? Aren't the mesh(es) already defined as a bunch of primitives?
>>55240018
This is too graphic designe for me
Yes.
Ask /3/. We don't actually know that stuff here. We only know that AYYYMD is bankrupt and finished housefire and Nvidia is a bunch of jews.
>>55240018
>Aren't the mesh(es) already defined as a bunch of primitives?
first of all, the vertex shader modifies the vertices themselves.
but more importantly, ya don't feed the GPU primitives, ya feed vertices.
You feed the GPU an array of vertex coordinates and instructions on what kind of primitives it should make out of them. You don't feed any explicit information about faces, the GPU just assembles the vertices in the order you feed them to it; for example, you might say that you want the GPU to render triangles. It will then draw a triangle between the first three vertices you feed it, then another triangle between the next three and so on. Often, people use triangle strips, which means the GPU draws a triangle between the first three vertices, then a triangle between the next vertex and the last two and so on.
Of course, you already have an idea of how the vertices should be connected, but it is faster to just store them in the right order than to send over explicit information about it to the GPU.
>>55241698
>>55241857
Thank you. Am I then right in saying that a 3D model (i.e. a 3ds max or blender file) contains only information about the vertices (position, normal, uv) and the order in which they should be fed to the GPU?
>>55241905
you can open a blender single object file to see what it contains and even make your own CPU renderer for it in about 2 hours. With shadows and cool ligtning and stuff in half a day. Its nothing complicated.
>>55241905
Not necessarily. It typically also contains information about face-specific shading (often called materials), textures, the primitive modes to use (in some models it can be useful to use for example both triangle strips and quads), lighting information and a load of other stuff.
I once implemented a very basic renderer using OpenGL and used my own file format which was basically just what you are describing. It contained a list of coordinates (and a few other bits of information like color and transparency) for each vertex and a list of indexes, that described the order to feed the vertices to the GPU to get the correct faces.
>>55240018
great thread, was interesting to read it