mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-17 05:49:30 -07:00
Fixing the names of shaders in the passes. The loadShader utility function now returns the code and the module, since I'm hoping to parse uniform buffer layouts from the code.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import std140 from "./std140.js";
|
||||
import { makePassFBO, loadTexture, loadShaderModule, makeUniformBuffer, makePass } from "./utils.js";
|
||||
import { makePassFBO, loadTexture, loadShader, makeUniformBuffer, makePass } from "./utils.js";
|
||||
|
||||
const { mat4, vec3 } = glMatrix;
|
||||
|
||||
@@ -72,7 +72,7 @@ const makeConfigBuffer = (device, config, density, gridSize) => {
|
||||
export default (context, getInputs) => {
|
||||
const { config, adapter, device, canvasContext, timeBuffer } = context;
|
||||
|
||||
const assets = [loadTexture(device, config.glyphTexURL), loadShaderModule(device, "shaders/wgsl/rainPass.wgsl")];
|
||||
const assets = [loadTexture(device, config.glyphTexURL), loadShader(device, "shaders/wgsl/rainPass.wgsl")];
|
||||
|
||||
// The volumetric mode multiplies the number of columns
|
||||
// to reach the desired density, and then overlaps them
|
||||
@@ -126,7 +126,7 @@ export default (context, getInputs) => {
|
||||
|
||||
computePipeline = device.createComputePipeline({
|
||||
compute: {
|
||||
module: rainShader,
|
||||
module: rainShader.module,
|
||||
entryPoint: "computeMain",
|
||||
},
|
||||
});
|
||||
@@ -139,11 +139,11 @@ export default (context, getInputs) => {
|
||||
|
||||
renderPipeline = device.createRenderPipeline({
|
||||
vertex: {
|
||||
module: rainShader,
|
||||
module: rainShader.module,
|
||||
entryPoint: "vertMain",
|
||||
},
|
||||
fragment: {
|
||||
module: rainShader,
|
||||
module: rainShader.module,
|
||||
entryPoint: "fragMain",
|
||||
targets: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user