UNPKG

playcanvas

Version:

Open-source WebGL/WebGPU 3D engine for the web

19 lines (17 loc) 451 B
class WebgpuPipeline { getPipelineLayout(bindGroupFormats) { const bindGroupLayouts = []; bindGroupFormats.forEach((format)=>{ bindGroupLayouts.push(format.bindGroupLayout); }); const desc = { bindGroupLayouts: bindGroupLayouts }; const pipelineLayout = this.device.wgpu.createPipelineLayout(desc); return pipelineLayout; } constructor(device){ this.device = device; } } export { WebgpuPipeline };