mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-16 21:39:29 -07:00
Exploring ways to preserve the vanilla JS browser demo without compromising on the bundle. Experimenting with embedding images in the bundle as data URIs
This commit is contained in:
@@ -7,7 +7,6 @@ import {
|
||||
makeBindGroup,
|
||||
makePass,
|
||||
} from "./utils.js";
|
||||
import imagePassShader from "../../shaders/wgsl/imagePass.wgsl";
|
||||
|
||||
// Multiplies the rendered rain and bloom by a loaded in image
|
||||
|
||||
@@ -16,7 +15,10 @@ const defaultBGURL =
|
||||
|
||||
export default ({ config, cache, device }) => {
|
||||
const bgURL = "bgURL" in config ? config.bgURL : defaultBGURL;
|
||||
const assets = [loadTexture(device, cache, bgURL), loadShader(device, imagePassShader)];
|
||||
const assets = [
|
||||
loadTexture(device, cache, bgURL),
|
||||
loadShader(device, "shaders/wgsl/imagePass.wgsl"),
|
||||
];
|
||||
|
||||
const linearSampler = device.createSampler({
|
||||
magFilter: "linear",
|
||||
|
||||
Reference in New Issue
Block a user