News for hackers. Stuff that matters.
Re:WebGPU Tech Demo by georginikolov on Thursday December 19, 2024 @12:14PM (#42463526)
WebGPU tech demo running in modern browsers showcasing various rendering techniques like deferred rendering with 400+ dynamic lights, Hi-Z screen space reflections and cascaded shadow mapping.
Re:WebGPU Tech Demo by sounds on Thursday December 19, 2024 @12:44PM (#42463897)
Firefox 133.0.3 fails with:

Uncaught (in promise) ReferenceError: GPUShaderStage is not defined

    <anonymous> https://gnikoloff.github.io/webgpu-sponza-demo/assets/index-BeB41sTJ.js:422

    <anonymous> https://gnikoloff.github.io/webgpu-sponza-demo/assets/index-BeB41sTJ.js:2288
Re:WebGPU Tech Demo by ruined on Thursday December 19, 2024 @02:18PM (#42464791)
nightly with webgpu enabled gets farther, but still fails.

    Uncaptured WebGPU error: Shader module creation failed: Parsing error
    Encountered one or more errors while creating shader module "Update Lights Shader Module"
    WebGPU compilation info for shader module "Update Lights Shader Module" (1 error(s), 0 warning(s), 0 info)

    Shader 'Update Lights Shader Module' parsing error: unknown attribute: 'must_use'
       ┌─ wgsl:44:4
       │
    44 │   @must_use
       │    ^^^^^^^^ unknown attribute
    Uncaptured WebGPU error: ShaderModule with 'Update Lights Shader Module' label is invalid 
looks like this happens for most of the shaders.

edit: seems to be related to this issue https://github.com/gfx-rs/wgpu/issues/5186

Re:WebGPU Tech Demo by mrec on Thursday December 19, 2024 @12:50PM (#42463954)
WebGPU still isn't enabled in Firefox by default (it's behind the dom.webgpu.enabled flag)
Re:WebGPU Tech Demo by roskelld on Thursday December 19, 2024 @01:15PM (#42464212)
I tried setting the flag to true but I get this after sadly.

Uncaught (in promise) DOMException: WebGPU is not yet available in Release or Beta builds. initialize https://gnikoloff.github.io/webgpu-sponza-demo/assets/index-... <anonymous> https://gnikoloff.github.io/webgpu-sponza-demo/assets/index-... <anonymous> https://gnikoloff.github.io/webgpu-sponza-demo/assets/index-...

Re:WebGPU Tech Demo by mrec on Thursday December 19, 2024 @06:52PM (#42466990)
Ah, apologies - it does need that config flag, but it's also only available in Nightly builds.
Re:WebGPU Tech Demo by hnuser123456 on Thursday December 19, 2024 @01:05PM (#42464098)
Works for me even on intel integrated. Nice work.

edit: I see you also wrote a webgpu ray tracer, very impressive! I am slowly working on a browser based 3d game in my spare time, your projects are right on my interests. I see you used MIT license on your ray tracer, do you have a license for the sponza demo?

Re:WebGPU Tech Demo by reaperducer on Thursday December 19, 2024 @01:21PM (#42464277)
WebGPU tech demo running in modern browsers showcasing various rendering techniques like deferred rendering with 400+ dynamic lights, Hi-Z screen space reflections and cascaded shadow mapping.

WebGPT has entered the chat.

Re:WebGPU Tech Demo by hnuser123456 on Thursday December 19, 2024 @01:28PM (#42464341)
No current LLM could write a project like this, he's just factually listing the features he implemented.
Re:WebGPU Tech Demo by jdiff on Thursday December 19, 2024 @01:42PM (#42464472)
I believe they were suggesting using WebGPU to accelerate AI workloads.
Re:WebGPU Tech Demo by reaperducer on Thursday December 19, 2024 @05:21PM (#42466334)
Actually I was pointing out that the parent comment was of no value, and was nothing but an LLM summary of the web page.
Re:WebGPU Tech Demo by georginikolov on Friday December 20, 2024 @01:17AM (#42468734)
you really think that? I typed it manually myself :D
Re:WebGPU Tech Demo by reaperducer on Friday December 20, 2024 @11:43AM (#42472583)
The point stands. Your comment added nothing of value to the discussion. You don't need to scrounge karma points by tl;dr-ing stuff for other people. We can all click on the link.
Re:WebGPU Tech Demo by Jyaif on Thursday December 19, 2024 @02:27PM (#42464868)
Nice work!

Out of curiosity, are there any of these features that couldn't be done with WebGL 2?

Re:WebGPU Tech Demo by ridruejo on Thursday December 19, 2024 @03:43PM (#42465524)
This is pretty cool, thanks for building it!
Re:WebGPU Tech Demo by fidotron on Thursday December 19, 2024 @03:47PM (#42465567)
This is very good stuff.

Did you do the whole reversing of the z trick?

I despise implementing cascaded shadow maps, and have a lot of respect for anyone that makes them work.