webgpu sponza
This commit is contained in:
parent
5553ded476
commit
b5d0f52da0
21 changed files with 1426 additions and 58 deletions
|
|
@ -181,5 +181,15 @@ export namespace Crafter {
|
|||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Convenience: create the "standard" linear-filter clamp-to-edge sampler,
|
||||
// allocate a slot for it, and return the slot. The wgpu* bridge call is
|
||||
// intentionally kept inside the library — example code shouldn't need to
|
||||
// reach into Crafter::WebGPU directly.
|
||||
inline SamplerSlot AllocateLinearClampSampler(DescriptorHeapWebGPU& heap) {
|
||||
DescriptorRange r = heap.AllocateSamplerSlots(1);
|
||||
heap.samplerTable[r.firstElement] = WebGPU::wgpuCreateLinearClampSampler();
|
||||
return SamplerSlot(&heap, r.firstElement);
|
||||
}
|
||||
}
|
||||
#endif // CRAFTER_GRAPHICS_WINDOW_DOM
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue