webgpu

This is actually amazing

  1. 3 weeks ago
    Anonymous

    i know right, next get crypto mining

  2. 3 weeks ago
    Anonymous

    Awesome bro. Are you y2k compliant yet too?

  3. 3 weeks ago
    Anonymous

    Does it work yet. Last time I tried it it just didn't work.

  4. 3 weeks ago
    Anonymous

    No idea what it exactly is, probably something like vulkan for websites?

    If so, can I like apply custom shaders to the entire document/ canvas ?

    • 3 weeks ago
      Anonymous

      >vulkan for websites?
      nop, its basically a graphics API. just like vulkan and metal. it has a spec.

      difference is there is no implementation for it at driver level (not yet at least) like we have for vulkan, opengl, metal, dx, etc

      so the implementations that exist today are run on top of vulkan/metal/dx.

      the major ones are: google dawn and rust wgpu

      the fact that is has "web" in the name was a awful decision, you can use it as a native library. browsers (chrome using dawn and firefox using wgpu) just support it because they have the implementation built in, so you can use it as "vulkan for websites"

    • 3 weeks ago
      Anonymous

      yeah its a graphics api standarized for web browsers

  5. 3 weeks ago
    Anonymous

    good explanation anon, now what's better about this as compared to just using Vulkan or DX

    • 3 weeks ago
      Anonymous

      not the same anon, but it's the same reason why electron/tauri makes more sense for developers than maintaining 5 native codebases between desktop and mobile + 1 web version

    • 3 weeks ago
      Anonymous

      It's higher level idiot

    • 2 weeks ago
      Anonymous

      It's higher level, you can't use Vulkan in the browser. You could implement WGPU using Vulkan to give you an idea of the difference between the two.

      Can't wait for that shit getting used for zero day exploits in the pajeetware drivers amd, intel and nvidia are shipping.

      WGPU is just getting translated to DX12 / VK / Metal, any bugs would be in one of those apis

      • 2 weeks ago
        Survival/Tech Game Guy

        And even then the spec has a bunch of error checking shenanigans that a compliant implementation must conform to to reduce exploits afaik.

  6. 3 weeks ago
    Anonymous

    Can't wait for that shit getting used for zero day exploits in the pajeetware drivers amd, intel and nvidia are shipping.

  7. 3 weeks ago
    Anonymous

    >connection lost
    >computer crashes

  8. 3 weeks ago
    Anonymous

    not available on chromium linux = might as well not exist

  9. 3 weeks ago
    Anonymous

    It’s like metal in the browser omfg

  10. 3 weeks ago
    Anonymous

    why would i want this over webgl THOUGH

  11. 3 weeks ago
    Anonymous

    So far so good. It really needs tutorials that don't just build toy examples. There's a lot of concepts to wrap your head around and little guidance on best practices for how to use them and why. Also ecosystem is immature. Nevertheless, having fun building my game on it now that it's all slowly making sense.

  12. 3 weeks ago
    Anonymous

    *Krashes*
    Wake me up when it has dedicated drivers instead of vulkan/metal wrappers

  13. 3 weeks ago
    Anonymous

    Literally mainframe or server gpu but worse on every possible way

    • 3 weeks ago
      Anonymous

      it's got literally nothing to do with either of those, pls try again

  14. 2 weeks ago
    Anonymous

    [...]

    >This site is suspended

    • 2 weeks ago
      Anonymous

      it expires after 1 hour but for some reason is back now, try again

  15. 2 weeks ago
    Survival/Tech Game Guy

    my only problem with it is that the spec requires wglsl support by default. Can someone actually explain to me why they couldn't have gone with SPIRV or something like that? I do remember seing a github PR where a guy was complaining a ton about WGLSL and how bad it was (though I feel it was a schizo post).

    I did use WebGPU (through wgpu) and it wasn't that bad honestly (other than the fact that I had to compile GLSL manually through shaderc and not through the shitty naga interface).

    • 2 weeks ago
      Anonymous

      I just looked into it and they really made WGSL instead using SPIRV like Vulkan! Yet another way to write a shader program... Great!

      • 2 weeks ago
        Survival/Tech Game Guy

        Yep! Sad thing is that most (if not all) rust engines / render engines that use WGPU tend to stick to it as well. In my custom engine I decided to use GLSL just cause I didn't like how WGSL looked and felt compared to GLSL. I guess they all have their ups and downs.

        https://github.com/gpuweb/gpuweb/issues/566

        Yep that was the post! To be fair I kind of understand where they're coming from when they keep saying that WGSL is pretty bad.

    • 2 weeks ago
      Anonymous

      https://github.com/gpuweb/gpuweb/issues/566

      • 2 weeks ago
        Anonymous

        Hahaha who made this and taught they made a good job?

      • 2 weeks ago
        Anonymous

        >closed due to language [WONT FIX]

      • 2 weeks ago
        Anonymous

        This is why you can't expect R*st retards to ever make anything good

      • 2 weeks ago
        Anonymous

        They just added a normal for loop.
        https://google.github.io/tour-of-wgsl/control-flow/for-statements/

    • 2 weeks ago
      Anonymous

      I think I read somewhere that most browsers were planning on supporting SPIR-V through an extension.

      • 2 weeks ago
        Survival/Tech Game Guy

        Oh really? There's already support for that in WGPU I didn't know it was meant to be supported in the spec. That would definitely help if I could compile everything to SPIRV instead lol.

  16. 2 weeks ago
    Anonymous

    After reading the article on Mozilla, I got to say that it is not bad. I suppose that it helped having experience with Vulkan, because WebGPU is low level (as low as you can get on the browser).
    Can you access it directly from WASM or you need to interface only through JS? That would really suck.
    Also WGSL is a retarded idea

    • 2 weeks ago
      Anonymous

      You'd still need Javascript to set up the canvas but it can be pretty seamless since Rust has wasm-bindgen to do that for you.

      You can even use webgl2 as a backend for WebGPU so you don't need to mess with the browser's settings to get webgpu to work.
      https://sotrh.github.io/learn-wgpu/beginner/tutorial1-window

  17. 2 weeks ago
    Anonymous

    Not for your freedom.

  18. 2 weeks ago
    Anonymous

    >finally cross-platform graphics API
    Yes if you use it outside a browser

  19. 2 weeks ago
    Anonymous

    [...]

    https://pastebin.com/x6f4puzf

    • 2 weeks ago
      Anonymous

      for (let x = 0; x < textureSize; x += 32) {
      for (let y = 0; y < textureSize; y += 16) {
      const brickColor = {
      r: baseColor.r + (Math.random() * 0.1 - 0.05),
      g: baseColor.g + (Math.random() * 0.1 - 0.05),
      b: baseColor.b + (Math.random() * 0.1 - 0.05)
      };

      context.fillStyle = `rgb(${Math.floor(brickColor.r * 255)}, ${Math.floor(brickColor.g * 255)}, ${Math.floor(brickColor.b * 255)})`;
      context.fillRect(x, y, 32, 16);
      }
      }

      let me guess, you """"need"""" more than a few lines of code to create a texture?

    • 2 weeks ago
      Anonymous

      >babylonjs
      This barely has anything to do with WebGPU except that one line where you initialize the engine.

  20. 2 weeks ago
    Anonymous

    james webbgpu

    yes.......... james web teelsecoep

  21. 2 weeks ago
    Anonymous

    >pref("browser.webgpu.enabled", false)

    the modern web is the largest remote execution exploit known to man

    • 2 weeks ago
      Anonymous

      I sure miss the good old days of ActiveX in IE.
      They even allowed you to set a web page as the desktop's wallpaper because lol who cares about security.

      • 2 weeks ago
        Anonymous

        wtf, what kind of use case requires implementing something like that?

  22. 2 weeks ago
    Anonymous

    WebGPUsisters, is there a way to measure how long a pass takes on the GPU without using a debugger? Wanna compare different pipeline ideas to see which is faster.

    • 2 weeks ago
      Anonymous

      Performance.now() ?

    • 2 weeks ago
      Anonymous

      https://omar-shehata.medium.com/how-to-use-webgpu-timestamp-query-9bf81fb5344a

      • 2 weeks ago
        Anonymous

        Thank you kind anon

  23. 2 weeks ago
    Anonymous

    Through several layer of abstraction, I got wgpu-native to work on my Ivy Bridge Intel HD integrated GPU.

  24. 2 weeks ago
    Anonymous

    I don’t know shit about the web and I was able to make a real-time Dashboard for some industrial process that was orders of magnitude faster than whatever the fuck the team of web guys was doing. The real, compiled program is of course faster and doesn’t require a very recent version of chrome, but the ability to hack together a quick tool with a imgui interface and have it just werk on the boomer´s Windows machine, the baseddev’s Mac, the autist’s Linux set-up and the normie’s browser is just neat.

Your email address will not be published. Required fields are marked *