Reinventing the Geometry Pipeline: Mesh Shaders in DirectX 12 | Shawn Hargreaves | DirectX Dev Day

  Рет қаралды 25,862

Microsoft DirectX 12 and Graphics Education

Microsoft DirectX 12 and Graphics Education

Күн бұрын

#dxdevday
The trusty vertex shader has served us well over the last 20 years, but the time has come to move on to something bigger and better. Mesh shaders apply the full power of generalized GPU compute to the geometry processing pipeline, unlocking a new level of flexibility and performance. This talk will share details about what they are, how they work, and how to get started using these exciting new capabilities.
About the speaker:
Shawn Hargreaves is the dev lead for Direct3D. He previously spent a couple of decades working on an assortment of games, tools, APIs, frameworks, and operating systems.
www.shawnhargreaves.com
About DirectX Developer Day: devblogs.microsoft.com/direct...
Specs: microsoft.github.io/DirectX-S...
Samples: github.com/microsoft/DirectX-...
PIX on Windows supports all DirectX 12 Ultimate features: devblogs.microsoft.com/pix/do...
Contact us: / discord

Пікірлер: 44
@tetraphobie
@tetraphobie 10 күн бұрын
This was a fantastic talk, simple to understand, informative and fun! I really wish I could see more content from Shawn!
@Alex-op2kc
@Alex-op2kc 3 жыл бұрын
Dear Shawn Hargreaves, thank you for this helpful video. You are a great teacher and speaker.
@hitmanxlol
@hitmanxlol Ай бұрын
I really enjoy those kind of videos when someone has been long enough in the industry to walk you through the evolution of that field. Architectures and APis are getting more complicated over time, so understanding the intuitions behind those decisions are even more important than the implementation itself.
@gfasterOS
@gfasterOS 3 жыл бұрын
I came to this video after watching a recent Techquickie video on mesh shaders. This has been tremendously informative.
@acardenasjr1340
@acardenasjr1340 4 жыл бұрын
Thanks for this, I'm not certified in this or even educated in it, just another Gamer, but I actually sat down and listened to it all, I didn't fall asleep or doze off, actually started to think of massive worlds and the potential this technology has for it.
@iestynne
@iestynne 4 жыл бұрын
Thanks for this! Much more useful content than the stuff put out by nvidia on this topic so far. Gotta love it when APIs gets simpler! (so rare to see people taking the time to simplify)
@mathanda1723
@mathanda1723 Жыл бұрын
LG hlhhhjnnnjj#mmkmmmnnj&kg g by hhlkhnhhjhhhhhhhhmh&jmbbHD. 2nd BBC c. .
@soonts
@soonts 4 жыл бұрын
You can generate geometry out of thin air in vertex shader. Bind empty vertex buffer and use SV_VertexId as the only input. I use it all the time in D3D11 for quads and such. You should have told why doing so with MS is more efficient, about better on-chip cache utilization due to vertices shared across triangles.
@Raelsatu
@Raelsatu 4 жыл бұрын
Programmable geo < 3 Would love to start leveraging this pipeline for certain projects.
@TarhIk
@TarhIk 4 жыл бұрын
Can a Mesh Shader be aware of the Meshlet being drawn and, if so, can custom logic be implemented? Something similar to what Bone Indexes (aka Blend Indices, skinweights, etc) are used for animation? The reason I ask is because, years ago, I couldn't use Unity3D because it has a technical limitation in which Unity 3D cannot draw skinweight models in batch so I had no choice but to use DirectX11 with Instancing due to performing issues. I use it (still using it) to create a game's world's terrain, which is literally a chessboard and each square has a bone weight, ensuring that the terrain is never flat. The terrain is being built at run-time, and only selected "squares" are drawn, which means it doesn't really matter the size of the game's world. However, with this idea about meshlets, I could just forget about instancing (I have some unwanted bugs I've been meaning to fix) and focus on meshlets. After all, each square is just 4 vertices, four textcoords, one blendindice vector (this one specifies the height of each corner) and just two triangles. So far, this Mesh Shader looks very, very interesting technology! Great Job!!!
@catalinvasile9081
@catalinvasile9081 4 жыл бұрын
I see DX12 and all I can think is Allegro... Good times
@mcgrotts
@mcgrotts 4 жыл бұрын
Will you be adding new projects to the samples that include mesh shading. Or is there one in particular that you recommend.
@mcgrotts
@mcgrotts 4 жыл бұрын
never mind, I was looking under the master branch.
@danielkrajnik3817
@danielkrajnik3817 3 жыл бұрын
Have you looked into SYCL project? Could it be somehow integrated? Seems like you working towards a common goal.
@polygon4399
@polygon4399 4 жыл бұрын
Where is the Meshletbuilder sample? I dont see it on github
@raghul1208
@raghul1208 Жыл бұрын
nice
@chilinouillesdepommesdeter819
@chilinouillesdepommesdeter819 3 жыл бұрын
How they learn thoes diffcult things?
@chilinouillesdepommesdeter819
@chilinouillesdepommesdeter819 3 жыл бұрын
I really want to be a good graphics programmer
@weltlos
@weltlos 3 жыл бұрын
Depending on where you are, start by learning basic concepts, which are also present in more user friendly API's like D3D11. Tutorials published on KZbin can help (I watched ChiliTomatoNoodle's videos for D3D11 and TheCherno's for C++). Then learn new fundamental concepts introduced in D3D12 (like Command Lists, Resources and Resource Descriptors). There are tutorials for these topics too, but mostly in written form (the best I had found is on a website called 3dgep (learning-directx-12)). At that point, you should have a good conceptual understanding of how things are done in graphics programming and should be able to grasp the (sadly poorly commented) sample applications provided by Microsoft on Github. Technical details that are good to know when implementing things yourself are documented on the DirectX-Specs site. I am a highschool student and I managed to learn how to write (graphics) code this way in roughly two years. Good luck!
@chilinouillesdepommesdeter819
@chilinouillesdepommesdeter819 3 жыл бұрын
@@weltlos But it's much harder,subjects like physics,numerical method and a lot of diffcult math is requred,not to say programming part.
@chilinouillesdepommesdeter819
@chilinouillesdepommesdeter819 3 жыл бұрын
@@weltlos I really doubt whether I can implement this before I die.
@weltlos
@weltlos 3 жыл бұрын
@@chilinouillesdepommesdeter819 Have you tried programming something on your own already? It really isn't as hard as you'd imagine and even math doesn't play as big of a role (depending on the type of application of course). This is because you can always write functions and abstract everything away, once the section you are working on is complete. For example, you might need to understand how Mesh Shaders work in detail and might need to come up with complex algorithms, but once you have implemented everything relating to it, you can essentially forget every detail and only remember what a Mesh Shader is and what it is used for. In the end, you only have to tell your application "Hey, generate a Mesh Shader for me based on this file an artist gave me and use it at that location.". And it just works without even having to give it a single thought. I think such an end result is highly rewarding and it is what makes programming so fanscinating for me. It's well worth the cost of sitting on your desk and trying to understand some math or whatever for a short period of time.
@santitabnavascues8673
@santitabnavascues8673 2 жыл бұрын
Welcome to Allegro
@alucardye767
@alucardye767 4 жыл бұрын
Oh my poor GTX 1080, I’m gonna be out of this new future, I’m not gonna get a new GPU any time soon.
@djmips
@djmips 3 жыл бұрын
It will still work on the GTX 1080
@Theninjagecko
@Theninjagecko 4 жыл бұрын
This guy knows his stuff, its like he probably has no social skills or anything else but 100% of him has gone into what he loves. I take my hat off to all at Microsoft they have really hit it out the park with the XBSX
@kazioo2
@kazioo2 4 жыл бұрын
Mesh Shaders were introduced by Nvidia in geforce RTX ~2 years ago. Microsoft just supports it in the API. It's inspired by tech first invented by Sony for PlayStation... 2 (!) in the form of programmable geometry pipeline and then wrongly abandoned for 2 decades...
@iestynne
@iestynne 4 жыл бұрын
Kaz that programming model was much harder to use than this, so it was not discarded without reason. Usability is important too (the more iterations you can do on your game, the better it will be).
@jonnyj.
@jonnyj. 2 жыл бұрын
@@iestynne Doesnt matter. The ps2 had some insanely unique and amazing features that were abandoned for the sake of complexity. Those vector units were also badass. The problem is they should NOT have abandoned this for a couple decades...
@iestynne
@iestynne 2 жыл бұрын
Yeah PS2 was amazing, and fun to work on if you like playing with technology. PS3 too. And you're right, this more accessible formulation of free-form programmability seems obvious enough in hindsight that it could have been proposed sooner... but things rarely evolve so cleanly.
@jrpeegy8294
@jrpeegy8294 Жыл бұрын
2023...and no games using mesh shader...Xbox is gona die if their first party don't take advantage of it...
@dough1595
@dough1595 7 ай бұрын
Alan Wake 2 is finally using it.
@jrpeegy8294
@jrpeegy8294 7 ай бұрын
@@dough1595 yes but not fully
@marcosbatista1029
@marcosbatista1029 7 ай бұрын
in the future it will be fully utilized , mesh shader are the future , there is no turning back @@jrpeegy8294
@Blackronin357
@Blackronin357 7 ай бұрын
The goal post moving ponies have infiltrated. 1st it was no game in 2023 is using it. Now it's that Alan Wake 2 isn't doing it fully. Mind you, ponies are big mad and seething that this tech is going to keep being used after Alan Wake just showed how it could be implemented and yield higher performance on Series X and S. 😂 Make up ya minds.
@Svyatpro
@Svyatpro 7 ай бұрын
marketers
@SophisticatedAss
@SophisticatedAss 4 жыл бұрын
All the delusional PlayStation fanboys claiming this feature is on PS5 😂😂😂
@RayDusso
@RayDusso 4 жыл бұрын
SophisticatedAss You are right, no mesh shader on PS5 but geometry engine which is pretty much the same thing.
@HickoryDickory86
@HickoryDickory86 3 жыл бұрын
There is nothing delusional about expecting this feature, or something similar, on the PS5. Mesh Shaders are not exclusive to DirectX12. Vulkan and OpenGL also have mesh shaders, so there is no reason to think that the PlayStation 5's own APIs (the successors or next-gen iterations of Gnm and Gnmx) cannot have them. Orbis OS is Sony's own operating system for the PlayStation, built on top of FreeBSD, so they can do and implement whatever they want, not being constrained to whatever is or is not implemented in someone else's APIs. Just because they haven't mentioned or advertized mesh shaders for the PS5 doesn't mean they aren't or won't be present. It only means they find the other features they have given attention to to be more noteworthy. And the hardware will not be a limitating factor for the PS5 either, as _both_ the Xbox Series X and the PS5 will be running their own custom Zen 2 + RDNA 2 APUs. I am not a Sony fanboy, and I don't really care about consoles in general. I am merely presenting the facts and making a logical inference from those facts. The facts are: 1. Mesh shaders are not API exclusive. They are already present on DirectX12, Vulkan, and OpenGL. 2. The Xbox Series X and PlayStation 5 will use very similar hardware, each one's custom APU being based on AMD's Zen 2 and RDNA 2 microarchitectures. Logical inference being: 3. The PlayStation 5 can and will also have mesh shaders (or something similar) if Sony has decided it wants to do so. There is no logical reason it can't nor a hardware limitation preventing it.
@HickoryDickory86
@HickoryDickory86 3 жыл бұрын
And as another commenter has pointed out, mesh shaders are similar to or were inspired by AMD's own primitive shaders, which were introduced with the RDNA 1 GPUs (5700 XT, et al). As the Unreal Engine 5 demo proves, the PS5 can and does use primitive shaders. So, again, your comment is the one that is "delusional." You try to insult "PlayStation fanboys" and, in doing so, only expose yourself to be the only fanboy the room.
@TheWestbury09
@TheWestbury09 3 жыл бұрын
@@HickoryDickory86 Primitive shaders still do not equal mesh shaders, it has not been proven if the ps5 is full rdna2 like the series x "There are several noticeable differences between the two. With the primitive shader setup AMD described, you still have to "assemble" the input data of predefined format (vertices and vertex indices) sequentially, where as with mesh shader the input is completely user defined, and the launching of mesh shader is not bound by the input assembly stage - it's more like compute shader that generates data to be consumed by the rasterizer. Also with primitive shader, the tessellation stage is still optionally present, whereas for mesh shader tessellation simply doesn't fit. edit: There are also overlaps between the two. Primitive culling are done programmatically and can be performed in a more unrestricted order; LDS is now (optionally) visible in user shader code, whereas in the traditional vertex shader based pipeline, each thread is unaware of Local Data Store's existence. So will PS5 also support mesh shader? Here's my take: To support mesh shader in its purest form, you'll need the GPU's command processor to be able to launch shader in mesh shader's way. If the command processor somehow isn't able so, as long as the API exposes good level of hardware detail, developers should be able to take most of mesh shader's advantages. If it's like AMD's approach with in-driver shader transformation, then the advantage will be limited compare to full mesh shader support, as programmability will be greatly sacrificed."
@pottuvoi2
@pottuvoi2 3 жыл бұрын
Yup, it's not confirmed. Ps2 other hand had the geometry pipeline which mesh shader is pretty much based on. Vector Unit was amazing for meshlet work. Sadly GS the rasterizer was junk which caused extra work for VU1, like had to have frustrum culling code in limited VU1 memory etc. Would have amazing to get VU1 like geometry pipeline to GPUs instead of basic T&L back then.. Well, better now than never.
DirectX 12 Sampler Feedback | Claire Andrews | DirectX Developer Day
17:54
Microsoft DirectX 12 and Graphics Education
Рет қаралды 13 М.
Interactive Graphics 20 - Compute & Mesh Shaders
59:58
Cem Yuksel
Рет қаралды 15 М.
Они убрались очень быстро!
00:40
Аришнев
Рет қаралды 2 МЛН
Increíble final 😱
00:37
Juan De Dios Pantoja 2
Рет қаралды 13 МЛН
Vulkanised 2023: Mesh shading best practices
30:09
Vulkan
Рет қаралды 4,6 М.
Resource Binding in DirectX 12 (pt.1)
16:25
Microsoft DirectX 12 and Graphics Education
Рет қаралды 15 М.
Interactive Graphics 17 - Geometry Shaders
51:09
Cem Yuksel
Рет қаралды 9 М.
Why Games Have Stutters | Shader Compilation
10:22
My Computer
Рет қаралды 12 М.
Running a Buffer Overflow Attack - Computerphile
17:30
Computerphile
Рет қаралды 2 МЛН
An introduction to Shader Art Coding
22:40
kishimisu
Рет қаралды 912 М.
Fast Inverse Square Root - A Quake III Algorithm
20:08
Nemean
Рет қаралды 4,9 МЛН
Эффект Карбонаро и бумажный телефон
1:01
История одного вокалиста
Рет қаралды 2,8 МЛН
5 НЕЛЕГАЛЬНЫХ гаджетов, за которые вас посадят
0:59
Кибер Андерсон
Рет қаралды 1,5 МЛН
Apple watch hidden camera
0:34
_vector_
Рет қаралды 58 МЛН