mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-17 13:59:30 -07:00
Added cache check to WebGPU renderer's loadShader method. Un-commented entries into config.js. Inclusions are now explicit dynamic import lambdas, so the cache functions can detect and call them; however, webpack and rollup seem to use them differently.
This commit is contained in:
@@ -5,7 +5,7 @@ import { loadShader, makeBindGroup, makePass } from "./utils.js";
|
||||
|
||||
const numVerticesPerQuad = 2 * 3;
|
||||
|
||||
export default ({ device, canvasFormat, canvasContext }) => {
|
||||
export default ({ device, cache, canvasFormat, canvasContext }) => {
|
||||
const nearestSampler = device.createSampler();
|
||||
|
||||
const renderPassConfig = {
|
||||
@@ -21,7 +21,7 @@ export default ({ device, canvasFormat, canvasContext }) => {
|
||||
let renderPipeline;
|
||||
let renderBindGroup;
|
||||
|
||||
const assets = [loadShader(device, "shaders/wgsl/endPass.wgsl")];
|
||||
const assets = [loadShader(device, cache, "shaders/wgsl/endPass.wgsl")];
|
||||
|
||||
const loaded = (async () => {
|
||||
const [imageShader] = await Promise.all(assets);
|
||||
|
||||
Reference in New Issue
Block a user