mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-17 13:59:30 -07:00
Adding some more comments. Destructuring the context object in the pass modules. A little code cleanup in bloomPass. Changing the endPass sampler to be cheaper.
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
import { loadShader, makeBindGroup, makePass } from "./utils.js";
|
||||
|
||||
// Eventually, WebGPU will allow the output of the final pass in the pipeline to be copied to the canvas texture.
|
||||
// Until then, this render pass does the job.
|
||||
|
||||
const numVerticesPerQuad = 2 * 3;
|
||||
|
||||
export default (context) => {
|
||||
const { config, device, canvasFormat, canvasContext } = context;
|
||||
|
||||
const linearSampler = device.createSampler({
|
||||
magFilter: "linear",
|
||||
minFilter: "linear",
|
||||
});
|
||||
export default ({ device, canvasFormat, canvasContext }) => {
|
||||
const nearestSampler = device.createSampler();
|
||||
|
||||
const renderPassConfig = {
|
||||
colorAttachments: [
|
||||
@@ -46,7 +44,7 @@ export default (context) => {
|
||||
})();
|
||||
|
||||
const build = (size, inputs) => {
|
||||
renderBindGroup = makeBindGroup(device, renderPipeline, 0, [linearSampler, inputs.primary.createView()]);
|
||||
renderBindGroup = makeBindGroup(device, renderPipeline, 0, [nearestSampler, inputs.primary.createView()]);
|
||||
return null;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user