#wgpu — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #wgpu, aggregated by home.social.
-
Как я пишу RTS про Марс на Rust вместе с ИИ-агентами: архитектура, ошибки и 400+ тестов
Можно ли одному человеку собрать не демо, а работающую классическую RTS, если почти весь код пишут несколько ИИ-агентов? Я проверяю это на неудобной задаче: Марс 1:1, Rust + wgpu, камера от орбиты до ног робота, отдельная детерминированная симуляция, единая шина команд для человека, сети и ИИ. Разбираю, что уже работает к середине проекта, как устроены научные карты и BUS, почему 15 мс «в API» оказались ожиданием GPU, как тест на одном ПК скрыл сетевой лаг и какие красивые решения пришлось выбросить после измерений. Читать разбор
https://habr.com/ru/articles/1068148/
#Rust #wgpu #gamedev #RTS #ИИагенты #процедурная_генерация #компьютерная_графика #сетевой_код #геоданные #детерминизм
-
Ratatui keeps getting wilder! 🐀
🧀 **bevy_tui_texture** — Render @ratatui_rs interfaces directly onto textures in Bevy
💯 Retro CRT WASM demo: https://tt-toe.github.io/bevy_tui_texture/examples/web/
🦀 GUI apps meet TUIs w/ Rust!
-
Ratatui keeps getting wilder! 🐀
🧀 **bevy_tui_texture** — Render @ratatui_rs interfaces directly onto textures in Bevy
💯 Retro CRT WASM demo: https://tt-toe.github.io/bevy_tui_texture/examples/web/
🦀 GUI apps meet TUIs w/ Rust!
-
I was able to understand that, to update the texture, I need to call queue.write_texture(). The only question is, how do I get hold of queue, if I'm using eframe/egui.
I still am not feeling frustrated for some reason, because I'm still learning.
I do have a way to get video frame, I just want to show it on screen and also apply shaders to it.
-
https://youtube.com/live/fc5W-PhbyGs Trying to make a video editor in wgpu 🤞
A video editor where you have to use shaders for everything, filters, effects.
Decode the video, get the frame, show it in wgpu surface. Can I do it?
-
Три фикса, четыре ошибки, один файл
# Как мы четыре раза неправильно диагностировали зависание на джобе 281 339 Несколько месяцев назад я писал, [как мы четыре раза неправильно чинили мерцание]( https://habr.com/ru/articles/1042962/ ) при рендеринге 4,4 миллиона полигонов. Тогда казалось, что это рекорд: месяц блужданий, четыре отброшенных подхода, решение на неделю. Эта история хуже. Баг пережил четыре диагноза подряд , два из которых мы успели «подтвердить числами», получил по дороге три работающих фикса от несуществующих причин - и в итоге оказался файлом, который лежал на рабочем столе. Напомню контекст: мы небольшой командой пишем на Rust + Vulkan редактор топологий интегральных схем + верификатор (DRC/LVS/Antenna/PEX) с прицелом на российский рынок. Команда - три человека, я в роли CTO направляю архитектуру и принимаю основные решения. В том числе неверные, о которых ниже. Тестовый основной дизайн всё тот же - Caravel SkyWater SKY130: 4,4 миллиона полигонов, 1014 уникальных ячеек, 22 уровня иерархии, 278 МБ GDS (недавно воспользовались прекрасным проектом [TinyTapeout]( https://github.com/TinyTapeout/ ) - для прогона на различных gds) К моменту этой истории мы только что закончили перф-кампанию по паразитной экстракции (PEX). Если коротко: чтобы посчитать ёмкости, нужно сначала собрать цепи - обойти иерархию чипа BFS-ом от каждого "сида" (точки на цепи устройства) и выяснить, какие фигуры электрически связаны. На Caravel это 537 748 сидов. Кампания ужала полный холодный прогон с 962 секунд до 70: пространственный грид вместо квадратичного перебора пар, параллельные трейсы на 14 потоках, кеш результата. Все гейты бит-идентичности зелёные, CLI летает.
https://habr.com/ru/articles/1047302/
#rust #wgpu #gpu #instanced_rendering #оптимизация_производительности #рендеринг #computer_graphics #eda #vulkan_api
-
Как мы четыре раза неправильно чинили мерцание при рендеринге 4,4 миллиона полигонов на wgpu
Уже год мы небольшой командой пишем на Rust + wgpu редактор топологий интегральных схем — что-то вроде KLayout, только с прицелом на российский рынок. Команда — три человека. Я в роли CTO направляю архитектуру и принимаю основные технические решения. История ниже — про одну такую серию решений, которую я завёл в тупик четыре раза подряд , прежде чем мы поняли, в чём была ошибка. Тестовый дизайн у нас — Caravel SkyWater SKY130, открытый чип на ~4,4 миллиона полигонов, 1014 уникальных ячеек и 22 уровня иерархии. Полный GDS-файл — 278 МБ. Первая попытка отрендерить это на экране показала: всё работает, всё на месте. Только мерцает. Не «иногда подёргивается» — а так, что смотреть невозможно. Любой zoom или pan превращал картинку в стробоскоп: половина чипа есть, половина пропала, через кадр — наоборот. Дальше — история про то, как мы четыре раза по-разному пытались это починить, и как пятая попытка наконец заработала. Если у кого-то такой же случай — может, сэкономлю недели две.
https://habr.com/ru/articles/1042962/
#rust #wgpu #gpu #instanced_rendering #оптимизация_производительности #рендеринг #computer_graphics #eda #vulkan_api
-
Sometimes writing #Rust is like figuring out how to draw a line in Java. First you make a Brush, Pen, Color, Stroke, and then you call the new Line...
I'm talking about WGPU APIs at the moment, but it just word mess.
-
Sometimes writing #Rust is like figuring out how to draw a line in Java. First you make a Brush, Pen, Color, Stroke, and then you call the new Line...
I'm talking about WGPU APIs at the moment, but it just word mess.
-
Orbiter is a generative ambient music system for the web + Linux, macOS, Win, iOS, Android, available also as DAW plugins. Enjoy!
Orbiter has a built-in neural sequencer, to compose meditative music, or for you to compose together with it — driving physically modelled instruments.
-
Orbiter is a generative ambient music system for the web + Linux, macOS, Win, iOS, Android, available also as DAW plugins. Enjoy!
Orbiter has a built-in neural sequencer, to compose meditative music, or for you to compose together with it — driving physically modelled instruments.
-
I am still developing my “grab a repo to build and run it” skills with #rust.
On my (mostly up to date) MacOS boxes this is fairly straightforward, but trying to coax code into building and running successfully on older hardware (eg ten year old raspberry pi) is harder and I’m still working out which things to fiddle on Cargo.toml to adjust how things are built. #GLEW #egui #wgpu -
I am still developing my “grab a repo to build and run it” skills with #rust.
On my (mostly up to date) MacOS boxes this is fairly straightforward, but trying to coax code into building and running successfully on older hardware (eg ten year old raspberry pi) is harder and I’m still working out which things to fiddle on Cargo.toml to adjust how things are built. #GLEW #egui #wgpu -
wgpu v0.29.0 is out 🎉
• get_current_texture → CurrentSurfaceTexture enum (no more SurfaceError)
• Display handle moved to InstanceDescriptor (winit friendly)
• Optional bind group layouts →full unbinding support
• WriteOnly<[u8]>for safe mapped buffer writes -
wgpu v0.29.0 is out 🎉
• get_current_texture → CurrentSurfaceTexture enum (no more SurfaceError)
• Display handle moved to InstanceDescriptor (winit friendly)
• Optional bind group layouts →full unbinding support
• WriteOnly<[u8]>for safe mapped buffer writes -
Colors are not mine, this is just how #wgpu-native has it :blobcat_thisisfine:
I finally looked up the story about Lemonodor, so yeah, I am way late to that party... I don't even understand why I am doing #commonlisp, but for some reason, I find it addictive.
And so, after 3 months of pretty intense work, I proudly present this beauty—THE TRIANGLE!!! :blobcat_dundundun:
It’s the wgpu-native triangle example implemented in CL with the #wgpu bindings lib I’ve been working on. I hope I can now exhale, relax, and take a small break. And then jump into it again. Refreshed. A bit, at least.
There’s going to be a lot of work to clean up the mess I made while zerg rushing things with my brain cells in these past 3 months before I start expanding the API. I hope wgpu-native will continue to bless me with smooth rendering and zero crashes. 🤞
-
Colors are not mine, this is just how #wgpu-native has it :blobcat_thisisfine:
I finally looked up the story about Lemonodor, so yeah, I am way late to that party... I don't even understand why I am doing #commonlisp, but for some reason, I find it addictive.
And so, after 3 months of pretty intense work, I proudly present this beauty—THE TRIANGLE!!! :blobcat_dundundun:
It’s the wgpu-native triangle example implemented in CL with the #wgpu bindings lib I’ve been working on. I hope I can now exhale, relax, and take a small break. And then jump into it again. Refreshed. A bit, at least.
There’s going to be a lot of work to clean up the mess I made while zerg rushing things with my brain cells in these past 3 months before I start expanding the API. I hope wgpu-native will continue to bless me with smooth rendering and zero crashes. 🤞
-
Shoutout to @juretriglav 's "Surfel-based global illumination on the web"
Genuinely one of the best posts I have ever seen. If you are interested in #GI #wgpu or #rendering and #graphics in general, I definitely recommend it.
I love playing around with the multi-scale mean estimator :D
https://juretriglav.si/surfel-based-global-illumination-on-the-web/
-
Shoutout to @juretriglav 's "Surfel-based global illumination on the web"
Genuinely one of the best posts I have ever seen. If you are interested in #GI #wgpu or #rendering and #graphics in general, I definitely recommend it.
I love playing around with the multi-scale mean estimator :D
https://juretriglav.si/surfel-based-global-illumination-on-the-web/
-
So this is the first time I'm doing anything raw #Vulkan in #RustLang, and ash is actually nice to work with (save all the unsafe-ness). Coming from #wgpu, the biggest difference is of course having to take care of memory allocations and synchronization yourself (and that there is no alternative to render passes in wgpu yet). Instead of VMA (and its #Rust-wrapper vk_mem) I picked https://github.com/Traverse-Research/gpu-allocator, which is also used by wgpu's Vulkan and D3D12 backends.
-
So this is the first time I'm doing anything raw #Vulkan in #RustLang, and ash is actually nice to work with (save all the unsafe-ness). Coming from #wgpu, the biggest difference is of course having to take care of memory allocations and synchronization yourself (and that there is no alternative to render passes in wgpu yet). Instead of VMA (and its #Rust-wrapper vk_mem) I picked https://github.com/Traverse-Research/gpu-allocator, which is also used by wgpu's Vulkan and D3D12 backends.
-
I finally got my head around WebGPU/wgpu enough to make my own render graph. Now the bubble universe thing is decomposed into a graph of render passes, and I've got some simple parameter animation going.
In this screencap, I'm varying the particle size and transparency and varying the number of particles in two ways in sync with the universe's revolution. The color map is just doing its own thing; that wasn't planned.
🧵 8/N
-
I finally got my head around WebGPU/wgpu enough to make my own render graph. Now the bubble universe thing is decomposed into a graph of render passes, and I've got some simple parameter animation going.
In this screencap, I'm varying the particle size and transparency and varying the number of particles in two ways in sync with the universe's revolution. The color map is just doing its own thing; that wasn't planned.
🧵 8/N
-
Oh, so it is 2026 already? And the month is February already? The last thing I remember is diving into a rabbit hole called "Surely writing my own c2ffi translator for my WGPU project is no big deal."
What's done is done. I am slowly recovering and ready to get back to my WGPU project. While the need for a custom translator is still debatable, I guess further practice will show if that's actually the case. Even if it was overkill, the time wasn't completely lost: I’ve learned more about Common Lisp and even did TDD for the first time in my life - who would've guessed it would finally happen in CL? :blobcat_thisisfine:
Behold, the monstrosity! https://github.com/keelah-mt/cl-kl-c2ffi
-
Oh, so it is 2026 already? And the month is February already? The last thing I remember is diving into a rabbit hole called "Surely writing my own c2ffi translator for my WGPU project is no big deal."
What's done is done. I am slowly recovering and ready to get back to my WGPU project. While the need for a custom translator is still debatable, I guess further practice will show if that's actually the case. Even if it was overkill, the time wasn't completely lost: I’ve learned more about Common Lisp and even did TDD for the first time in my life - who would've guessed it would finally happen in CL? :blobcat_thisisfine:
Behold, the monstrosity! https://github.com/keelah-mt/cl-kl-c2ffi
-
If you want to browse the source, read the README and then look at the two shaders in the shaders/ directory. Those are the ones that implement the bubble universe algorithm; the other 1,000+ lines is just scaffolding to get data in and out of the GPU.
EDIT: Do I need to mention that this code is rough as three day stubble? It will get cleaner, then messier, then cleaner...
🧵 8/N
-
If you want to browse the source, read the README and then look at the two shaders in the shaders/ directory. Those are the ones that implement the bubble universe algorithm; the other 1,000+ lines is just scaffolding to get data in and out of the GPU.
EDIT: Do I need to mention that this code is rough as three day stubble? It will get cleaner, then messier, then cleaner...
🧵 8/N
-
I wrote another one! I ported my Javascript + WebGPU implementation to Python + wgpu-py, and now I have a desktop app.
And I pushed it to Github. "Share and enjoy!"
https://github.com/kbob/bubble-universe
🧵 7/N
-
I wrote another one! I ported my Javascript + WebGPU implementation to Python + wgpu-py, and now I have a desktop app.
And I pushed it to Github. "Share and enjoy!"
https://github.com/kbob/bubble-universe
🧵 7/N
-
Your terminal is now a texture! 🤯
💠 **bevy_tui_texture** — A Bevy plugin for rendering TUIs using Ratatui and wgpu
⚡ Display widgets on 2D sprites, 3D meshes or UI elements, all with WASM support!
🦀 Written in Rust & built with @ratatui_rs
⭐ GitHub: https://github.com/tt-toe/bevy_tui_texture
#rustlang #ratatui #tui #bevy #gamedev #wgpu #graphics #wasm #devtools
-
Your terminal is now a texture! 🤯
💠 **bevy_tui_texture** — A Bevy plugin for rendering TUIs using Ratatui and wgpu
⚡ Display widgets on 2D sprites, 3D meshes or UI elements, all with WASM support!
🦀 Written in Rust & built with @ratatui_rs
⭐ GitHub: https://github.com/tt-toe/bevy_tui_texture
#rustlang #ratatui #tui #bevy #gamedev #wgpu #graphics #wasm #devtools
-
Remember all my pain of WGPU using massive amounts of memory? All gone! With just switching to AMD GPU.
With Nvidia same Smithay hello world used 170MB of memory, now with AMD it's just 18MB.
I do get one weird warning:
WARNING: radv is not a conformant Vulkan implementation, testing use only.
-
Remember all my pain of WGPU using massive amounts of memory? All gone! With just switching to AMD GPU.
With Nvidia same Smithay hello world used 170MB of memory, now with AMD it's just 18MB.
I do get one weird warning:
WARNING: radv is not a conformant Vulkan implementation, testing use only.
-
Eh, I found out why my EGUI attempts are so funny.
- WGPU 0.19 uses 50M of memory
- WGPU 27 uses 200MTesting right after device creation (adapter.request_device)
Why does latest WGPU use so much!
-
Eh, I found out why my EGUI attempts are so funny.
- WGPU 0.19 uses 50M of memory
- WGPU 27 uses 200MTesting right after device creation (adapter.request_device)
Why does latest WGPU use so much!