Тёмный

Compute Shaders in Bevy 

Logic Projects
Подписаться 7 тыс.
Просмотров 12 тыс.
50% 1

Опубликовано:

 

30 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 21   
@patrick1532
@patrick1532 Год назад
I really wish there was more documentation and examples on shader integration in bevy, I'm trying to do something relatively simple but unconventional and I don't want to completely tear out the bevy render pipeline and lose out on their parallelism, but most of the bits you actually have to write in their abstractions are standard wgpu boilerplate but more obfuscated and spaghettified because the control flow is not entirely clear from their examples. I'm probably wrong but it's a little frustrating. Thanks for doing your part to help.
@logicprojects
@logicprojects Год назад
Yeah the best documentation is to look at how the engine does things. I often have to look at how they handle lights and UI rendering to understand how I could add something myself.
@DristusFalchion
@DristusFalchion Год назад
So hyped for this. Thank you for making it!
@IMPOSING-NOOB2233
@IMPOSING-NOOB2233 Год назад
I have a project where FPS drops after I render about 50,000 batched sprites per frame. Looking forward to moving to GPU shader like this. Thanks!!!
@sveinjohansen6271
@sveinjohansen6271 Год назад
I was looking for something like this to learn more Rust, and here it is ! thanks, will study this.. Im into particle simulation.
@soupborsh6002
@soupborsh6002 Год назад
Can you rewrite The Powder Toy with compute shader? It will be amazing! This game is FOSS.
@jacques-dev
@jacques-dev Год назад
I wonder what kind of logic you need for a gas and fluid sim like Powder Toy and how that code would need to run on the GPU
@Otakutaru
@Otakutaru Год назад
This is soooo niche.... and sooo goood :D
@michaeljamescollins6800
@michaeljamescollins6800 Год назад
thank you
@rotteegher39
@rotteegher39 Год назад
Cool
@jeffg4686
@jeffg4686 Год назад
Great topic. Are you able to build this with wasm-pack or similar and run with same result?
@logicprojects
@logicprojects Год назад
I'm away from my home setup for holidays so I can't test that anytime soon. My intuition would be no, because I've seen some issues with the storage buffers we use and WebGL but the overall compute shader techniques should work. But also I've seen bevy internally use them for point lights so maybe it would work, needs testing
@jeffg4686
@jeffg4686 Год назад
@@logicprojects - thanks, I'll give it a try this week. Just getting back into this. The compute is where it's at, for sure. A lot more legwork, but worth it. I wonder if they'll be able to do a "derive" for this at some point like they did with the regular shaders. That was nice to see all that come together. they really highlighted the power of the derive. Oh, and thanks again for putting this together. You're not kidding when you say there isn't much documentation out there, and I'm not talking about Bevy. I'm talking about Compute. Combine the two, and there's just a few videos now, so each is much appreciated, and all including this one have been a big help. Curious also, if you've looked into, or used "Multi Draw Indirect" functionality in any game frameworks before. I believe this is able to be done through wgpu using compute shaders, but I haven't looked into it yet. I think in some cases can be very helpful performance wise especially for dedicated (not on chip) gpus in scenes with lots of unique objects (not having to round trip to cpu for each) - not sure how much it buys. probably very scene dependent.
@airman122469
@airman122469 Год назад
I feel like shaders should just be dealt with in the material render pass.
@redberries8039
@redberries8039 11 месяцев назад
Re reading buffer data back to cpu: Can your read_buffer fn run as a Bevy 'system' on 'update' or do we need to run it from the Render-World ie render node run() or something similar? Since you were 'vague' on getting the buffer data to the App-World I assume it's called from somewhere like a render node run()?? Have you had any further thoughts on getting the renderworld vec back into the appworld? There's Struct bevy::render::render_resource::BufferSlice which has 'pub fn map_async' which looks like it might do something similar to your custom fn, but doesn't help us get the data to the appworld. This is all a bit beyond me so any help would be appreciated.
@redberries8039
@redberries8039 10 месяцев назад
'render_resource::BufferSlice ' is a bust. The buffer being referred to is the command buffer, not any ad-hoc storage buffer
@airman122469
@airman122469 Год назад
Why exactly do you need to copy from the GPU to CPU? The material should just stay on the texture buffer on the GPU.
@buren77
@buren77 Год назад
Just for debugging purposes
@feathersm7966
@feathersm7966 Год назад
Brilliant info, tried to do this a while back.
@SEOTADEO
@SEOTADEO Год назад
Thanks, so interesting!
@hak0bu
@hak0bu Год назад
Actually first :D
Далее
Bevy Rendering Demystified
25:30
Просмотров 14 тыс.
Coding Adventure: Compute Shaders
5:25
Просмотров 789 тыс.
How To Write Fast Shaders
10:33
Просмотров 19 тыс.
Exploring compute shaders in Bevy
32:27
Просмотров 11 тыс.
Bevy: A quick introduction
7:20
Просмотров 16 тыс.
I Made a Graphics Engine (again)
8:27
Просмотров 172 тыс.
Compiled Python is FAST
12:57
Просмотров 111 тыс.
The hidden beauty of the A* algorithm
19:22
Просмотров 865 тыс.
The Most Valuable File Format You've Never Heard Of
15:33
The POWER of COMPUTE SHADERS!!!
10:01
Просмотров 13 тыс.
What Is A Graphics Programmer?
30:21
Просмотров 427 тыс.
WebGPU :: Javascript at the speed of Light
20:02
Просмотров 82 тыс.