[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
I'm learning about the graphics pipeline. As I understand
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 10
Thread images: 1
File: gl-pipeline.png (22 KB, 1000x194) Image search: [Google]
gl-pipeline.png
22 KB, 1000x194
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
Thread replies: 10
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.