[HN Gopher] Wgpu-0.10 released: WebGPU implementation now in pur...
___________________________________________________________________
Wgpu-0.10 released: WebGPU implementation now in pure Rust
Author : kvark
Score : 81 points
Date : 2021-08-18 21:11 UTC (1 hours ago)
(HTM) web link (gfx-rs.github.io)
(TXT) w3m dump (gfx-rs.github.io)
| efnx wrote:
| This is great. I switched my renderer from OpenGL to wgpu for my
| engine and I cannot exaggerate how much better the error
| reporting is. Instead of "working incorrectly" or simply not
| working and providing a vague error code (like OpenGL), wgpu
| tells me exactly what I did wrong, which is a life saver.
|
| Also - types. Thanks wgpu team!
| porphyra wrote:
| Ah yes, OpenGL's error reporting is notoriously bad. If you
| forget to call disable on a vertex attribute you might just get
| a random error 1282 (invalid operation) somewhere down the line
| in a totally irrelevant part of the code, lol.
| _cart wrote:
| As Bevy Engine's lead developer (which uses wgpu), this release
| excites me for a number of reasons:
|
| * A smaller (and less abstracted) codebase means that we can more
| easily extend wgpu with the features we need now and in the
| future. (ex: XR, ray tracing, exposing raw backend apis). The
| barrier to entry is so much lower.
|
| * It shows that the wgpu team is receptive to our feedback. There
| was a point during our "new renderer experiments" where we were
| considering other "flatter" gpu abstractions for our new
| renderer. They immediately took this into account and kicked off
| this re-architecture. There were other people with similar
| feedback so I can't take full credit here, but the timing was
| perfect.
|
| * A pure rust stack means that our builds are even simpler.
| Combine that with Naga for shader reflection and compilation and
| we can remove a lot of the "build quirks" in our pipeline that
| come from non-rust dependencies. Windows especially suffers from
| this type of build weirdness and I'm excited to not need to deal
| with that anymore.
|
| * The "risk" of treating wgpu as our "main gpu abstraction layer"
| has gone way down thanks to the last few points. As a result, we
| have decided to completely remove our old "abstract render layer"
| in favor of wgpu. This means that wgpu is no longer a
| "bevy_render backend". It is now bevy_render's core gpu
| abstraction. This makes our code smaller, simpler, and more
| compatible with the wider wgpu ecosystem.
|
| * There is a work-in-progress WebGL2 backend for the new wgpu.
| This will hopefully ultimately remove the need for the third
| party bevy_webgl2 backend (which has served us well, but it has
| its own quirks and complexities).
| CyberRabbi wrote:
| > This means that wgpu is no longer a "bevy_render backend". It
| is now bevy_render's core gpu abstraction.
|
| Experience has shown me that you will eventually regret this
| decision
| timClicks wrote:
| Wow, this feels like a win-win-win for wgpu, bevy and the rust
| ecosystem in general
| jaas wrote:
| Can/will this be used in Firefox at some point?
| devwastaken wrote:
| Does WebGPU protect against DOS via shaders, crashes, etc? Games
| like VRChat, where a user can just make shaders in Unity and have
| them ran on everyone elses computer - could really benefit from
| such a thing. There's an increase in games that are marketed as
| being able to create your own content that is displayed for other
| users in a game.
| encryptluks2 wrote:
| > gfx-rs community's goal is to make graphics programming in Rust
| easy, fast, and reliable.
|
| Yet one of their main projects involves reliance on the web for
| graphics programming. This is the opposite of their stated goal
| in my opinion.
| pitaj wrote:
| What are you talking about?
| zamadatix wrote:
| You may want to take a look at what exactly WebGPU is and the
| wgpu repository, particularly the examples subfolder, before
| drawing conclusions based on the name.
| _cart wrote:
| Yup wgpu has a WebGPU backend, but it also has first-class
| native backends for Vulkan, Metal, DX12, and OpenGL ES (with
| upcoming support for DX11 and WebGL). It is designed to be a
| cross platform graphics API. It isn't "web based", just "web
| compatible". And it has super solid "feature detection" that
| enables you to opt in to "native only" features like push
| constants.
| [deleted]
___________________________________________________________________
(page generated 2021-08-18 23:00 UTC)