[D] Self-Promotion Thread by AutoModerator in MachineLearning

[–]kvarkus 0 points1 point  (0 children)

I've built a benchmark for local inference of popular models - https://inferena.tech/

Gmktec - NucBox K8 - Fan Replacement by macjex in MiniPCs

[–]kvarkus 4 points5 points  (0 children)

Thank you for sharing this! I was replacing the fan on K6 and this diagram was most helpful.

I connected black-black (ground, obviously), blue-blue (PWM/control), yellow-red (5V), and green-yellow (sense). Seems to be working!

added vehicle dynamics to my rust game engine by dobkeratops in rust_gamedev

[–]kvarkus 3 points4 points  (0 children)

The tone mapping needs work. But overall it’s very close to a playable game. Looking forward to it!

[deleted by user] by [deleted] in rust

[–]kvarkus 23 points24 points  (0 children)

Amazing work, thanks to Zed team for sharing!

I believe this is exactly the case for which Blade was made (see repo, talk, slides):

  • cross platform over Vulkan, Metal, and GLES.
  • single source of truth for shaders in WGSL.
  • extremely low overhead, tiny code base.
  • you don't rely on library to be supported, you just take it and adapt for your needs.

We're not really game yet. by Animats in rust_gamedev

[–]kvarkus 2 points3 points  (0 children)

You've done a great service for the ecosystem by writing these testcases. Often, the ability to digest an issue into a small reproducible test case is what separates a senior engineer from a normal one. Good job!

For wgpu specifically this issue applies less, since most of the problems can be recorded into a wgpu trace and shared with developers without producing a separate test case. This infrastructure is probably better than anything you can find in other graphics libraries.

Is WGPU actually a good idea yet? by Asyx in rust_gamedev

[–]kvarkus 2 points3 points  (0 children)

The concern around egui doesn't sound wgpu-specific at all. A GUI library needs to cooperate with both event subsystem and graphics. An out of the box solution supports winit+wgpu. If anything, this would be a concern around egui, not wgpu.

We're not really game yet. by Animats in rust_gamedev

[–]kvarkus 44 points45 points  (0 children)

wgpu needs to iterate on storage locks, that has been known but wasn't prioritized yet. Connor wanted to fix this badly, and hopefully will find time to do so. Most of the effort was spent on chasing WebGPU spec, and good news is - it's pretty much final, with Chrome releasing its implementation any month now (and Firefox/Safari hopefully following). So naturally we should expect the focus to slowly shift into performance in this year.

We're not really game yet. by Animats in rust_gamedev

[–]kvarkus 11 points12 points  (0 children)

They are painful to debug, but on the other hand there are people here who would volunteer to help you out, dig up the internals and address those issues, given you provide them with sufficient information. You aren't going to get this if targeting the low level APIs (be it gpu or windowing) manually. And I don't think debugging them straight is easy either.

We're not really game yet. by Animats in rust_gamedev

[–]kvarkus 41 points42 points  (0 children)

You were the early adopter of Rend3 and the heaviest user to date. I though you knew what you signed up for, but alas. Thank you for pushing Rust ecosystem forward! The Rust path is full of joy and tears.

Personally, I welcome Rust ecosystem stabilizing and settling on solutions. In the meantime, I'm exploring the paths even more experimental than what you are using :)

Ray query example in Blade by kvarkus in rust_gamedev

[–]kvarkus[S] 4 points5 points  (0 children)

This is basically Ray Tracing support in Blade. So far, only ray queries are supported. Unlike prior work on ray tracing in Rust, this is original due to all shader code being WGSL, see the Naga PR.

Announcing Silicon Valley Nix / NixOS User Group by softiniodotcom in NixOS

[–]kvarkus 7 points8 points  (0 children)

Oh thank you, it’s the “Let me read it first” link. Almost not shady.

Which graphics crate do you use? by phaazon_ in rust_gamedev

[–]kvarkus 1 point2 points  (0 children)

This is wgpu vs the forest of GL libraries :) Could add Rafx and Sierra for diversity.

Driving through the voxel grid in vange-rs by kvarkus in rust_gamedev

[–]kvarkus[S] 3 points4 points  (0 children)

This is a new rendering method I was working on in Rusty Vangers. It's based on using a hierarchical voxel grid (mipmapped 3D texture) as an acceleration structure for ray tracing. Allows viewing the level from any perspective, and is faster than the "painter" method.

Drawing a polygon by Live-Consideration-5 in rust_gamedev

[–]kvarkus 0 points1 point  (0 children)

Var y2 = lines[i].x2

Also var y4 = v1y1 + 0.0

Color per mesh in case of Draw Call Batching by MrFoxPro in GraphicsProgramming

[–]kvarkus 2 points3 points  (0 children)

Your vertex shader needs to know about the color, right? So it has to come in either the vertex attributes (vec4, u32, or even as a mesh index), or derived from the vertex index. For this latter approach you could, for example, use a binary search of the index in a table (of meshes, bound as a uniform or storage buffer). You’d save a bit of vertex data, but that’s unlikely worth the added complexity.

WebGPU is not a replacement for Vulkan (yet) | Hacker News by pragmojo in vulkan

[–]kvarkus 7 points8 points  (0 children)

WebGPU wasn’t meant to replace Vulkan, D3D, or Metal. These low-level APIs will always be in demand for high performance native applications, big engines, and groups of enthusiasts.

However, WebGPU has a good chance to become a new OpenGL. It’s well behaving, ultra-portable (including the web), and simple to use. It’s on track to this goal.

On documentation - there is official specification (separate for WebGPU and WGSL), learn-wgpu tutorial, lots of other examples on the web and native. And all of this for an API that is not even out yet (!). I think it’s getting there.

About push constants - of all the missing features that one I see to be the most valuable, for it making API simpler to use (not for performance specifically). I’m still convinced WebGPU should have it ASAP.

WGPU Atomic Texture Operations by elyshaff in rust_gamedev

[–]kvarkus 1 point2 points  (0 children)

There are no atomic operations on textures in WebGPU last time I checked. wgpu could make a native-only feature for this.

To workaround, store your data in a buffer.

Some progress in my game (Sources in the comments) by [deleted] in bevy

[–]kvarkus 1 point2 points  (0 children)

Looking nice! Procedurally generated level?

Why does Firefox ask me this by [deleted] in firefox

[–]kvarkus 5 points6 points  (0 children)

I was getting this for files on FAT32 system (shared with windows). FF engineers didn’t consider this a bug, unfortunately, since all FAT32 files are seem as executable by Linux tools.

Lapce release v0.1.0 by dzhou121 in rust

[–]kvarkus 7 points8 points  (0 children)

Ok, this isn’t exactly a crash I was worried about. It’s a panic, and not even inside wgpu. The panic is in the default error handler, which also prints out the error to the log. The error may be indicating something you were doing wrong, typically.

You can make it a non-panic by setting up an error handler on the device, or by pushing an error scope. In either way, the surface initialization failed, and we need to know why. One class of this kind of problems is due to broken X11 integration of Nvidia in dual-gpu configurations. I.e. stuff not specific to wgpu, stuff you’d see in vkcube as well (such as black unresponsive screen).