so you've finally gotten your hot little hands on a shiny new graphics card for
your pc and you're confident that by pushing it to its limits you'll be able
to run any game at mouth-watering settings
but it turns out there's a long-standing bottleneck that limits how many frames
your GPU can push and we're not talking about your CPU or the pci express slot
it's actually the GPU's pipeline the set of steps that visual data has to go
through in order to become a fully rendered image but how does that
pipeline bottleneck your gaming experience let's find out by learning
how a graphics pipeline works and we'd like to extend our warm thanks to gianlu
senior program manager at microsoft for helping us understand the problem and
the solution that's starting to gain adoption
the first three steps of the pipeline called the geometry pipeline are really
important and actually end up being where the bottleneck is step one is when
the raw visual data basically just numbers plain numbers like mama used to
make them goes through an input assembler which takes the vertices of
the triangles that ultimately make up a finished image and organizes them so
that they're pointing at each other correctly step two takes this organized
set of vertices and puts them through a vertex shader which raises or lowers the
vertices to create a 3d mesh of sorts for example the vertex shader can create
a bumpy texture on a wall or ripples on a pond the third step is a rasterizer
this is the bit that puts pixels inside each triangle to fill out the image now
there are other steps beyond these three namely pixel shading which gives each
pixel the appropriate color and lighting and the output merger which puts
different visual elements together such as ensuring a character standing in
front of a wall is displayed properly so you only see the character and not the
wall behind them however the big bottleneck we're talking about today
involves those first three steps but why are they such a bottleneck i mean the
process seems pretty straightforward well there are a few big reasons for
this one is that that first step the input assembler can only understand data
that's organized in a very specific way typically it can't accept compressed
data that can be moved around more quickly or if a developer thinks of a
more efficient way to organize their data the input assembler simply won't be
able to understand it two there are actually several optional stages after
the vertex shader for example one is called a geometry shader that can take a
point and expand it out to a particular shape such as a strand of hair this is
quicker than drawing a bunch of new triangles but the geometry shader and
other optional steps have been added over the years as games have become more
complex they're essentially glommed onto the pipeline in a rigid sequential way
that can't be processed in parallel meaning they take longer three because
of this rigid sequence you have to wait until you get to the rasterizer to start
culling sounds dangerous or throwing away unused
triangles that are way off in the distance or obscured by an object on the
screen this is a problem because by the time the data has gotten to the
rasterizer phase of the pipeline the GPU has already done a ton of legwork
rendering unnecessary triangles
sounds like my typical wednesday evening so because the geometry pipeline is so
inflexible the solution isn't to retool it it's to replace it completely this is
where mesh shading comes in one of the biggest features in the directx 12
ultimate API instead of having discrete steps before the rasterizer the mesh
shader is one stage that can do a few
really cool things first the data that you feed into it can
be much more arbitrary so it can understand compressed data and other
data sets an old-school input assembler couldn't you can't handle this new data
old man essentially the mesh shader is almost like a mini programmable computer
so if a developer wants to accomplish some rendering task more efficiently
they can just code it in each of the processes above can also intelligently
communicate with each other within a mesh shader so instead of waiting to
cull triangles so late in the process it can be done earlier and the geometry can
even be arranged in a way to make culling easier demanding even less GPU
power oh and we haven't even talked about the whole reason it's called mesh
shading in the first place it's a really fun term
meshlets instead of working on one triangle at
once your GPU can instead work on meshes of multiple triangles in parallel so
instead of making a decision about calling one triangle your GPU can
instead do them in batches throwing out data it doesn't need to process and
saving precious resources older vertex
shaders only saw a soup of points instead of an actual mesh but mesh
shaders are much smarter and they can know exactly what they're working with
much earlier in the rendering process so what does all of this mean
well because your GPU doesn't have to work as hard for each frame it means
faster frame rates and more detailed environments ultimately the things we
all want from our graphics cards currently many game developers are
looking at the best ways to implement mesh shading into their titles because
it's such a customizable tool and the old geometry pipeline has been around
for such a long time it might take a few years before we see widespread adoption
of mesh shading in popular games the good news though is that there's already
hardware support for it with newer consumer graphics cards so by the time
we see these games on the market chances are we'll all have next-gen graphics
cards that support these new features every one of us
yes i can't wait
i can't wait for you to check out our sponsor freshbooks they're an invoicing
and accounting solution that's built for owners and their clients they state that
the average user saves 46 hours a month gets paid 18 days faster and increases
their roi by 11 times using freshbooks
freshbooks is a huge benefit for freelancers and small business owners
who don't have time to waste on invoicing accounting and payment
processing over 3000 business owners have rated freshbooks an average of four
and a half out of five stars on get app and it's super easy to get up and
running with award-winning support so you'll never be alone try freshbooks
free for 30 days no credit card required go to freshbooks.com techwiki and enter
techwiki in the how did you hear about us section makes sense well guys that's
a tech wiki video not sure if you've ever seen one before but that's
that's what it's like hey speaking of like you want to like the video if you
liked it hey do you have a like do you have a like to give out
please we love your likes also check out our other videos comment
below with video suggestions and don't forget to subscribe and follow Techquickie
love you