webgpu sponza
This commit is contained in:
parent
5553ded476
commit
b5d0f52da0
21 changed files with 1426 additions and 58 deletions
|
|
@ -22,6 +22,7 @@ module Crafter.Graphics:PipelineRTWebGPU_impl;
|
|||
|
||||
import :PipelineRTWebGPU;
|
||||
import :ShaderBindingTableWebGPU;
|
||||
import :WebGPUComputeShader;
|
||||
import :RT;
|
||||
import :WebGPU;
|
||||
import std;
|
||||
|
|
@ -65,7 +66,9 @@ void PipelineRTWebGPU::Init(WebGPUCommandEncoderRef /*cmd*/,
|
|||
std::span<const RTShaderGroup> raygenGroups,
|
||||
std::span<const RTShaderGroup> missGroups,
|
||||
std::span<const RTShaderGroup> hitGroups,
|
||||
const ShaderBindingTableWebGPU& sbt) {
|
||||
const ShaderBindingTableWebGPU& sbt,
|
||||
std::span<const UICustomBinding> bindings) {
|
||||
userBindings.assign(bindings.begin(), bindings.end());
|
||||
std::string wgsl;
|
||||
wgsl.reserve(8 * 1024);
|
||||
|
||||
|
|
@ -183,5 +186,7 @@ void PipelineRTWebGPU::Init(WebGPUCommandEncoderRef /*cmd*/,
|
|||
|
||||
pipelineHandle = WebGPU::wgpuLoadRTPipeline(
|
||||
wgsl.data(),
|
||||
static_cast<std::int32_t>(wgsl.size()));
|
||||
static_cast<std::int32_t>(wgsl.size()),
|
||||
userBindings.empty() ? nullptr : userBindings.data(),
|
||||
static_cast<std::int32_t>(userBindings.size()));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue