How To Write Fast Shaders
Вставка
- Опубліковано 25 чер 2024
- Shaders performance test:
docs.google.com/document/d/1-...
Data Oriented Desing:
gameprogrammingpatterns.com/d...
• CppCon 2014: Mike Acto...
RDR 2 graphics study by Hüseyin:
imgeself.github.io/posts/2020...
Sharper Mipmapping using Shader Based Supersampling by Ben Golus:
/ sharper-mipmapping-usi...
Music:
Wehrmut by Godmode
Divider by Chris Zabriskie is licensed under a Creative Commons Attribution 4.0 license. creativecommons.org/licenses/...
Artist: chriszabriskie.com/
camerashake_background_music_pt2 by Igor Vaiman
/ igor_vaiman
Beyond by Patrick Patrikios
0:00 Intro
0:56 Data Locality
02:01 Latency Hiding
03:02 Context Switch
03:42 Practical Tips
04:44 Texture Format
05:36 MIP-mapping
06:40 Channel Packing
07:12 Compute and Shared Memory
08:42 Blur Example
10:03 Outro
#shaders #unity #optimization #programming - Наука та технологія
Turns out I completely misused the term cache coherency. Pretend that every time I say "coherency" it's actually "locality". Sorry about that.
You're certainly not the only one. I've been to many GDC talks where the speaker makes the same mistake which is probably why a lot of us do too.
Really nicely done! Would love to see more videos on this topic :)
Update Plz!!!!!😃
Really impressive production quality! Looking forward to more videos from you :)
A few things to add; shared memory is slow on mobile, so be careful when caching texture fetches there, as it might actually cost you. However this is really good on desktop when you have a lot of or big textures in resolution or bpp. Another important thing is that the most efficient group thread count may vary depending on your shader and gpu, so be sure to test on your target device(s) and pick the optimal version (some might want 16x16, some 32x32 for example). Aside from this, be sure that the group size (W*H*L) is dividable by 32 or you lose some perf because of how threads are scheduled.
Insanely well made video! Thank you so much for this! :)
Excellent video! I've implemented and modified your previous projects (FFT Ocean & Aero Surfaces) in my current project. Your explanations are invaluable! Great stuff!
I haven't seen such quality of a video for a while.
great introduction to the topic with very cool visualization! thanks
Very informative. Hard to get a video on such a critical topic. Thank you 👍
Great explanation and visualization. Keep going!
Wow, this was really helpful! I just finished my first compute shader project (marching cubes) and realized there's a way I can save on performance by reducing memory costs! Thanks so much!
Excellent video! Definitely a really good description of everything.
Your videos never cease to amaze me!
Fantastic video! Now waiting for a sequel about subgroup intrinsics and register allocation!
Very good video, subscribed. Would love to see more videos like this.
Excellent Video! It is so hard to find good resources on shader optomization so it usually boils down to either a.)repeated benchmarking and/or b.)guesswork.
That's a great video! Thank you, keep up the good work!
Very nice Video, didnt expect some generall GPU video to be so helpfull.
Very well explained. Keep it up!
That was clear and brilliant many thanks.
great job. thk u a lot. mostly I loos all the details, but I get the main idea. supercool visualisation makes a sense. great empact! I`will look it some more) that`s what I was lookin 4
Потрясающее видео во всём: от интересности и практичности до качества как визуального, так и "образовательного" с точки зрения подачи информации. Спасибо!
I learned a lot, thank you!
Amazing video!
Your channel is underrated
Would love a more detailed video on your ocean system
great video!!
Have you thought about doing some more plane stuff?
Would be awesome if you made a version of your IFFT ocean for UE4.27 since it would still work for UE5 with a little tweak but it would support devs with existing projects that are difficult to migrate to a newer engine version.
A video about quad trees on the Unreal Engine would be highly valued as well.
Very nice video that helped me understand some things better. Can you elaborate how you misinterpreted the unity manual/how it actually works? And for another question, the resizeable BAR feature newer gpus do, do you know how that can be used for more performance in practice? Is it just better to use certain texture sizes for it?
Desktop GPUs do all floating-point calculations in 32-bit float format, while some mobile or older hardware can do half precision (16-bit) or fixed calculations. Unity manual says just that (however, on very recent GPUs native 16-bit float calcualtions are possible again). This doesn't say anything about textures though, they can have various formats. For some time I thought that they are also converted to 32-bits and all other fancy formats are for mobile. And was wrong!
@@JumpTrajectory So textures are stored in various formats on the GPU but calculations are done in 32bit float right? (ignoring 16bit/int of old hardware)
@@FredDufresne Basically yes! On desktop in HLSL half is just an alias for float. Though I think there is also native int calculations support. Also 16-bit is not only for old hardware, but also for mobile and for newer desktop hardware.
Do you ever do game jams? I like your style and would like to join up with you :)
Occasionally! Took part in all the GMTK ones
Could you talk about how to dispatch in a group as you show at @9:19? Would you decide the threads to be (8,1,1)?
Yeah, you could do something like numthreads(im_width, 1, 1), and comuteShader.Dispatch(...., 1, im_height, 1)
You've been working on the new water in WoW, haven't you? I'm probably wrong.
im only here for sanic O_O
Чувак, ты в порядке?
Привет! Как можно с тобой связаться? Я Tech Artist, и мне интересно ты все ещё разрабатываешь игры? На ИТч ио у тебя много проектов)
можно в твиттер написать twitter.com/pensionerov
Почему ты перестал выпускать видео ?
Subtitles would be very helpful.😀
Done!
gpu hungry need more ops
I need stocks for your channel
Узнаю акцент
and? where's the accent from?
@@milanstevic8424 Россия-матушка
@@JumpTrajectory for some reason I thought you were Dutch, I don't know why, but yes I can hear it now.
greetings from Serbia, very nice video.
@@milanstevic8424 Fun fact, youtube auto generated Dutch subtitles for this video, so you are not alone
@@JumpTrajectory haha, so that's why I made that assumption. well it managed to completely derail me :)