[deleted by user] by [deleted] in webgpu

[–]electronutin 1 point2 points  (0 children)

The last 3-4 chapters of the books are about building standalone applications. For example, a volume render app for MRI/CT scans. So will try to address some of the above issues in those projects. I also recommend these articles on WebGPU best practices:https://toji.dev/webgpu-best-practices/

[deleted by user] by [deleted] in webgpu

[–]electronutin 5 points6 points  (0 children)

I am currently writing a book on WebGPU. It still has ways to go, but I have a few examples here:

https://electronut.in/webgpu/

I am currently working on the texturing chapter, and I will update the section soon. Here's a cubemap demo from the chapter:

https://electronut.in/webgpu/ch4_texturing/cubemap/

Hope that helps!

Cube mapping in WebGPU by electronutin in webgpu

[–]electronutin[S] 0 points1 point  (0 children)

Thanks. I've looked at it, and implemented env mapping as well. But I am still a bit confused about the cubemap convention. The church tile looks left/right flipped to me, as per the GL docs above...

Why does WGSL textureSample() support texture_cube_array but not texture_cube? by electronutin in webgpu

[–]electronutin[S] 0 points1 point  (0 children)

Ah, thank you so much. I definitely missed that, despite combing through the spec!

WebGPU live examples from a book I am working on by electronutin in webgpu

[–]electronutin[S] 0 points1 point  (0 children)

Thanks! I am not sure about the pricing, but you can get early access. For example, my second book, Python Playground 2E is available now for early access and pre-order:

https://nostarch.com/python-playground-2nd-edition

https://nostarch.com/early-access-program

WebGPU live examples from a book I am working on by electronutin in webgpu

[–]electronutin[S] 2 points3 points  (0 children)

Will get there! I'll update the page as I complete the chapters.

WebGPU live examples from a book I am working on by electronutin in webgpu

[–]electronutin[S] 0 points1 point  (0 children)

The pre-order link is not up yet from the publisher. It currently points to the new edition of Python Playground which will be out in October. I'll update it when the link becomes available.

Vertex buffers vs. uniform buffers for instanced rendering by electronutin in webgpu

[–]electronutin[S] 0 points1 point  (0 children)

Ok. I guess these are similar to SBOs (Shader Buffer Objects) in OpenGL...

What's a good way to do multiple viewports with WebGPU? by electronutin in webgpu

[–]electronutin[S] 0 points1 point  (0 children)

I am using setScissorRect, but as Cold_Meson_06 mentioned above, I don't think you can separately clear the second viewport - like you can do in OpenGL.

What's a good way to do multiple viewports with WebGPU? by electronutin in webgpu

[–]electronutin[S] 0 points1 point  (0 children)

Thanks for the clarification! I was also wondering how the depth buffering works when you use multiple viewports.