mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-18 06:09:30 -07:00
Wrote another utility method for cramming an array of resources into a bind group.
This commit is contained in:
@@ -73,15 +73,7 @@ export default (context, getInputs) => {
|
||||
const inputs = getInputs();
|
||||
const tex = inputs.primary;
|
||||
const bloomTex = inputs.primary; // TODO: bloom
|
||||
const renderBindGroup = device.createBindGroup({
|
||||
layout: renderPipeline.getBindGroupLayout(0),
|
||||
entries: [configBuffer, timeBuffer, linearSampler, tex.createView(), bloomTex.createView()]
|
||||
.map((resource) => (resource instanceof GPUBuffer ? { buffer: resource } : resource))
|
||||
.map((resource, binding) => ({
|
||||
binding,
|
||||
resource,
|
||||
})),
|
||||
});
|
||||
const renderBindGroup = makeBindGroup(device, renderPipeline, 0, [configBuffer, timeBuffer, linearSampler, tex.createView(), bloomTex.createView()]);
|
||||
|
||||
renderPassConfig.colorAttachments[0].view = output.createView();
|
||||
const renderPass = encoder.beginRenderPass(renderPassConfig);
|
||||
|
||||
Reference in New Issue
Block a user