Giter VIP home page Giter VIP logo

webgpu-step-by-step's People

Contributors

jack1232 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webgpu-step-by-step's Issues

Webgpu is getting released in chrome 113, might be perfect time to update to latest webgpu version

Thank you for making these step by step tutorials 🥇

Fyi
https://developer.chrome.com/blog/webgpu-release/

The Chrome team is thrilled to announce that WebGPU is now available by default in Chrome 113, which is currently in the Beta channel.

Might be a perfect time to update to newest webgpu version.
Think a lot more people want to try out webgpu more when its not behind a flag in next version

Just tried one and was hit by a few warnings 😄

image

webgpu02 will not run

While running webgpu02...
I've already debugged the pipleine and this is what i'm seeing ...

Type 'IteratorResult<{ view: GPUTextureView; loadValue: { r: number; g: number; b: number; a: number; }; storeOp: "store"; }, any>' is not assignable to type 'IteratorResult<GPURenderPassColorAttachment | null, any>' Type 'IteratorYieldResult<{ view: GPUTextureView; loadValue: { r: number; g: number; b: number; a: number; }; storeOp: "store"; }>' is not assignable to type 'IteratorResult<GPURenderPassColorAttachment | null, any>'. Type 'IteratorYieldResult<{ view: GPUTextureView; loadValue: { r: number; g: number; b: number; a: number; }; storeOp: "store"; }>' is not assignable to type 'IteratorYieldResult<GPURenderPassColorAttachment | null>'. Type '{ view: GPUTextureView; loadValue: { r: number; g: number; b: number; a: number; }; storeOp: "store"; }' is not assignable to type 'GPURenderPassColorAttachment'. Object literal may only specify known properties, and 'loadValue' does not exist in type 'GPURenderPassColorAttachment'.

looks to be an error with this
const renderPass = commandEncoder.beginRenderPass({ colorAttachments: [{ view: textureView, loadValue: { r: 1., g: 1., b: 1., a: 1. }, //background color storeOp: 'store' }] });

I'm not sure how to fix this part...

Pass vec4 to a fragment wgsl

Hello, I am following your examples in the book and the videos on youtube and I see you decided to go for a template string inside a typescript file instead of using wgsl extension. I have two questions regarding this:

  • Is there a performance impact on doing so? Does it decrease the performance of WebGPU using a template string instead of a .wgsl file?
  • How can you pass a vec4 from the pipeline to a fragment wgsl shader?

Thank you very much for sharing your experience.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.