2 ms·
Yes. WGPU is often being used as a common layer to abstract Vulkan, Apple's Metal, and Microsoft's DX12, which do pretty much the same thing. Modern 3D graphic
by Animats 4y ago
Yes. WGPU is often being used as a common layer to abstract Vulkan, Apple's Metal, and Microsoft's DX12, which do pretty much the same thing.
Modern 3D graphics programming mostly abstracts to:
- Load standard gLTF shaders into GPU.
- Create mesh objects. Send to GPU.
- Create texture maps. Send to GPU.
- Create light objects. Send to GPU.
- Create 4x4 transform matrices. Send to GPU.
- Create objects referencing meshes, textures, and transforms. Send to GPU.
- Create camera transform matrix. Send to GPU.
- Tell GPU "Go!".
Beyond that, it's mostly special effects, such as atmosphere, lens flare, etc.
Most of the headaches today involve managing the memory in the GPU, for which there are libraries.
- LoganDark 4y agoSmall nitpick: 'WGPU' is somewhat ambiguous because it could refer to either WebGPU itself, or wgpu[1] which is a library implementing a derivative of the WebGPU API that can be used by native code. [1]: https://docs.rs/wgpu https://docs.rs/wgpu
- Animats 4y agoI'm thinking mostly of the latter, which is useful for cross-platform work.