This release significantly enhances Diligent Engine by introducing the WebGPU backend, making the web a first-class citizen in the Diligent Engine ecosystem. WebGPU is a modern graphics API specifically designed for the web, offering several key advantages over WebGL. These enhancements are now fully leveraged by Diligent Engine, providing:
- Lower Overhead and Higher Rendering Performance: WebGPU reduces CPU overhead, allowing more efficient use of hardware resources, leading to smoother and faster rendering.
- Support for Compute Shaders: Unlike WebGL, WebGPU natively supports compute shaders, enabling more complex and parallel computations directly on the GPU.
- Improved API Design: WebGPU offers a more streamlined and explicit API, reducing ambiguity and making it easier for developers to harness the full power of modern GPUs.
- Enhanced Resource Management: WebGPU provides better control over memory and resource management, leading to more predictable performance and reduced latency.
In addition to the WebGPU backend, this release also introduces asynchronous shader compilation. This feature allows shaders to be compiled in parallel, preventing the rendering thread from being blocked during compilation. Asynchronous shader compilation is fully supported in the WebGPU backend, ensuring a smooth and responsive experience even during complex rendering tasks.
We are also excited to announce that samples are now available to run directly on the web. You can explore these samples at the Diligent Engine Samples Website (https://diligentgraphics.github.io/). This makes it easier than ever to see the power of Diligent Engine in action, directly in your browser.
API Changes
- Implemented WebGPU backend
- Added
EngineWebGPUCreateInfo
- Added
IEngineFactoryWebGPU
interface - Added
RENDER_DEVICE_TYPE_WEBGPU
,SHADER_SOURCE_LANGUAGE_WGSL
,SHADER_VARIABLE_FLAG_UNFILTERABLE_FLOAT_TEXTURE_WEBGPU
,
SHADER_VARIABLE_FLAG_NON_FILTERING_SAMPLER_WEBGPU
enum values - Added
WEB_GPU_BINDING_TYPE
enum,WebGPUResourceAttribs
struct, and
WebGPUResourceAttribs WebGPUAttribs
member toPipelineResourceDesc
struct - Added WebGPU-specific interfaces (
IRenderDeviceWebGPU
,IDeviceContextWebGPU
, etc.)
- Added
- Enabled asynchronous shdare and pipeline state compilation (API255001)
- Added
AsyncShaderCompilation
render device feature - Added
pAsyncShaderCompilationThreadPool
andNumAsyncShaderCompilerThreads
members toEngineCreateInfo
struct - Added
SHADER_COMPILE_FLAG_ASYNCHRONOUS
andPSO_CREATE_FLAG_ASYNCHRONOUS
flags - Added
SHADER_STATUS
andPIPELINE_STATE_STATUS
enums - Added
IShader::GetStatus
andIPipelineState::GetStatus
methods
- Added