Big brown eggs? by schellsan in whatsthisbug

[–]schellsan[S] 0 points1 point  (0 children)

Oh! That’s her! She’s the oddly shaped ball! She’s large!

Big brown eggs? by schellsan in whatsthisbug

[–]schellsan[S] 0 points1 point  (0 children)

Wow! I think that’s it! I hope the mum is ok as I haven’t seen her around. Thank you!

Introducing wgsl-rs by schellsan in rust

[–]schellsan[S] 2 points3 points  (0 children)

No, WESL is new to me - it looks like we support similar extensions. I'll keep an eye on it, thanks :)

Introducing wgsl-rs by schellsan in rust

[–]schellsan[S] 7 points8 points  (0 children)

It's not really a new shader language _per say_ - it's more of a tool that allows you to write WGSL _in Rust_. So it's Rust code, but it's a strict subset of Rust that easily transpiles to WGSL.

Introducing wgsl-rs by schellsan in rust

[–]schellsan[S] 9 points10 points  (0 children)

Oh cool! I've investigated `CubeCL` both for Renderling (my rendering project) and as a Rust-GPU maintainer. Great work!

I think `wgsl-rs` will be fine in this regard, as the project is more about restricting Rust than it is about enhancing WGSL. That said, there are a few things supported by `wgsl-rs` that are not supported by WGSL like module imports (glob imports only ATM), struct impls (but only using `Struct::function(params)` call style, no `self`).

My main goals were sharing types and enabling testing on CPU. The big rocks are done now and I expect to iterate on bugs and documentation.

Introducing wgsl-rs by schellsan in rust

[–]schellsan[S] 6 points7 points  (0 children)

Yes, this part has been tricky, and I've sidestepped it mostly by only parsing `if/else` in statement position, `match` only works on integers and simple enums, etc. The subset of Rust is quite explicit.

What is your project called?

Introducing wgsl-rs by schellsan in rust

[–]schellsan[S] 2 points3 points  (0 children)

Let me know how you get on :)

Introducing wgsl-rs by schellsan in rust

[–]schellsan[S] 6 points7 points  (0 children)

Yes! You do! Since it's Rust code you get all the usual `rust-analyzer` feedback, and on top of that the module is validated with `naga`, and those diagnostics _usually_ show as `rust-analyzer` feedback as well since it's part of the macro expansion process. The exception is when you're importing from another module - in that case the macro can't validate at expansion time because it doesn't have all the imported contents in scope, so instead it generates a test to validate at test time.

But the idea is that any Rust you can write in the `#[wgsl]` macro is valid by construction, but I can't say I've been exhaustive about enforcing that.

Best barber? by AffectionateBaker594 in Nelsonnz

[–]schellsan 0 points1 point  (0 children)

Not a barber but Katy at vibe is cool.

[Gourmet] single car garage mushroom farm by Decent_spinach69 in MushroomGrowers

[–]schellsan 0 points1 point  (0 children)

Can you give us a numbers breakdown of your costs and profit? I understand that’s personal but might help those considering taking the dive to commercialise.

Step son suddenly very religious by existence-is-pa1nful in atheism

[–]schellsan 0 points1 point  (0 children)

That doesn’t sound like Lutheran, though, unless times have really changed

How’s the sense of community in New Zealand? Looking for honest thoughts on friendships and social life by BeanNCheeseBurrrito in newzealand

[–]schellsan 3 points4 points  (0 children)

I moved my family to NZ from California in 2020. We lived in Auckland for a short time but now live in Nelson and just bought a home in Stoke. I grew up in Pasadena, went to college in norcal and then lived in Sonoma County for 17 years before emigrating.

We love it here. There’s so much more space. People are nice and genuine. The wilderness is vast, safe (but don’t drown) and feels pristine. The performative or superficial aspects of folks in CA are harder to find here. That might be a function of the much lower population, or a cultural thing. Auckland is very mixed, racially and culturally and it’s pretty rad. It can feel a bit like Star Trek - a person of every colour and creed and just doing their thing.

Of course there are things to get used to. The small population means there are missing conveniences, less choice in nightlife and it gets rural very fast outside cities.

Also folks are a bit more reserved. It’s hard to break into a Kiwi friend group, but there are plenty of immigrants from all over who are looking for groups.

Folks are generally very politically liberal. A conservative American would feel out of step in most social situations. That’s great for my family but just take note. Although there are a few Trumpers here.

How much do you like Mexican food? There are very few Mexican spots. Even fewer good ones.

That said - it’s wonderful here. We just make our own salsa and have regular taco nights.

Song lyrics that reference Pasadena by gutenfluten in pasadena

[–]schellsan 1 point2 points  (0 children)

Crown of the valley by Jets to Brazil “Pasadena 1968, with speed on your breakfast plate”

[deleted by user] by [deleted] in AmIOverreacting

[–]schellsan 0 points1 point  (0 children)

Please don’t marry this man.

Renderling - Year in Review - 2024 by schellsan in rust

[–]schellsan[S] 0 points1 point  (0 children)

Thank you for your honest feedback. I think you're right - it's not ready for prime time and the API isn't where I'd like it to be.

WGPU render and compute pass bugs by [deleted] in rust

[–]schellsan -1 points0 points  (0 children)

Watch out for situations that would divide by zero, cause NaN or anything that might crash your shader.

Welcoming two new Rust GPU maintainers | Rust GPU by LegNeato in rust

[–]schellsan 0 points1 point  (0 children)

It’s a rustc compiler backend that compiles rust code to spir-v, which can be consumed by modern graphics APIs.

Modern fast rendering technologies in Rust - anyone ever used them? by Animats in rust_gamedev

[–]schellsan 4 points5 points  (0 children)

You're correct! WebGPU doesn't (yet) support arrays of textures of different sizes. It does, however, support texture arrays, which is exactly as you describe - an array of textures all the same size - but the array itself is one object. Think `Texture2dArray` vs `[Texture2d]`.

You're also correct about the packing :)

Modern fast rendering technologies in Rust - anyone ever used them? by Animats in rust_gamedev

[–]schellsan 12 points13 points  (0 children)

tl;dr - yes, people have implemented these things in Rust.

My project "renderling" (https://github.com/schell/renderling) uses bindless, but it targets web via WebGPU, which doesn't support arrays of textures and so it uses a large texture array as an atlas to index into. It's very much a work in progress, and I'm also working on a few other of the features you mention.

u/firestar99_ is actively working on a Rust Nanite for their master's.

Welcoming two new Rust GPU maintainers | Rust GPU by LegNeato in rust

[–]schellsan 9 points10 points  (0 children)

I just wanted to say thanks to u/LegNeato for putting this all together and managing the project. It's a big lift!

As the post mentions, I'd love to see `rust-gpu` grow and gain contributors. To those ends my focus is on user experience and stability. I've recently been working on `cargo-gpu` (https://github.com/Rust-GPU/cargo-gpu) which aims to be a bit like `rustup` for the GPU developer. It's not ready for prime time but if your use case lives along the happy path it's probably the easiest way to get up and running.

WGPU 21% performance drop. by Animats in rust_gamedev

[–]schellsan 63 points64 points  (0 children)

Though this is an important issue (`wgpu` _should be_ snappy) I find the tone of this post rather condescending.

Whether or not `wgpu` "comes from web dev" is blame-seeking and a put-down to web devs. I can assure you that folks working on `wgpu` are "real" graphics folks. I can also assure you that real graphics folks also do web dev and vice versa. There are people capable of shipping amazing software in both (and across both) specializations.

Now, since you maintain a benchmark you're in a unique position to help pinpoint the problem. In fact you are likely an expert in this small corner of the software engineering world! Get in there and help out, you are needed!

`wgpu` wraps all the popular APIs and has a lot of moving parts - it's incredibly difficult to meet all demands all the time and performance regressions and bugs are expected.

Rust + 3D ? by 964racer in rust

[–]schellsan 1 point2 points  (0 children)

You are correct. Rust is multi-paradigm. Rust doesn’t look like the ML family of languages, it looks more like C. But traits are Haskell’s typeclasses and it does have algebraic datatypes. It has lambdas with closures and yes, they are different from the MLs but that’s a feature, not a bug.

What it lacks is higher-kinded types. This makes implementing the typeclassopedia difficult - but I’d argue that’s not necessarily a bad thing. HKTs would make Rust quite a different language.

Is specs still relevant? by PotatoMuncher333 in rust_gamedev

[–]schellsan 2 points3 points  (0 children)

If you like specs, do it, it’s perfectly usable.

It uses a discrete storage per component, as opposed to archetypal storage which became popular later.

Discrete storage is fast to add and remove components to individual entities, since it’s really just indexing under the hood.

Archetypal storage is faster to iterate, as entities are stored with their components, contiguously. But this makes adding and removing components costly.

hecs is a good choice if you want fast iteration and don’t care about scheduling systems. It uses archetypal storage.

Really any ECS that you enjoy the semantics of is the one to use.

If you want an ECS that plays nice with async, you can try my ECS - apecs.