WebGPU Fundamentals

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • fciv-net

    Discontinued Freeciv 3D - Fciv.net the 3D version of the Freeciv strategy game

  • I have been trying to add WebGPU support to https://www.fciv.net - however the Three.js 3D engine I'm using isn't ready for WebGPU yet, and no current browsers support WebGPU yet.

  • contrast_renderer

    Contrast is a WebGPU based 2D render engine written in Rust

  • This is true, but there is a lot more to the story. For one, WebGPU does not (yet) support mesh shaders, though it may later as an extension. For two, consider a glyph such as "o" that has two contours. Real triangulation generates a mesh that only generates triangles between the outer and inner contours, and mesh shaders aren't good at that. There are techniques (cover and stencil) that draw twice, incrementing and decrementing a winding number stored in the stencil buffer (see contrast renderer[1] for a clean modern implementation), but it does require nontrivial tracking on the CPU side, and can result in lots of draw calls to switch between the cover and stencil stages unless sophisticated batching is done.

    Compute shaders avoid all these problems and work on WebGPU 1.0 today.

    [1]: https://github.com/Lichtso/contrast_renderer

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • caniuse

    Raw browser/feature support data from caniuse.com

  • Highly unavailable still, but it seems to be non-experimental in chrome 113-115, as of writing this

    https://caniuse.com/?search=webgpu

  • WebGL_Compute_shader

    WebGL 2.0 Compute shader Demos

  • Yes,

    https://registry.khronos.org/webgl/specs/latest/2.0-compute/

    https://github.com/9ballsyndrome/WebGL_Compute_shader

    And then Google decides not implementating it after all, because of WebGPU.

    https://github.com/9ballsyndrome/WebGL_Compute_shader/issues...

  • tfjs

    A WebGL accelerated JavaScript library for training and deploying ML models.

  • It's a pity that tfjs never truly developed any decent ops. E.g. you need lgamma to implement the cap for zero-inflated poisson regression and tfjs simply doesn't have that: https://github.com/tensorflow/tfjs/issues/2011

  • wgpu

    Cross-platform, safe, pure-rust graphics api.

  • Gecko engine looks pretty healthy to me overall. And WebGPU in particular is the least of a concern, given that Firefox's implementation is based on wgpu [1], which has great community and a lot of users within and outside of Rust ecosystem. I'm confident Firefox can ship it soon (tm).

    [1] https://github.com/gfx-rs/wgpu

  • qemujs

    Qemu.js source code with proof-of-concept machine-code-to-WASM JIT.

  • Why not? People are already running VM's and other OS's in the browser.

    https://github.com/atrosinenko/qemujs

    https://jamesfriend.com.au/pce-js/ibmpc-games/

    https://leaningtech.com/webvm-server-less-x86-virtual-machin...

    and so on...

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts