rainPass now renders multiple cameras and viewports, using data from the hardware.

Added quiltPass (which uses holoplay’s quilting shader).
Added a holoplay effect version. (Versions can also now specify a preferred renderer.)
This commit is contained in:
Rezmason
2021-12-15 07:20:33 -08:00
parent 68ad689e1e
commit 2364bbc8bc
7 changed files with 1047 additions and 12 deletions

View File

@@ -75,6 +75,7 @@ const defaults = {
slant: 0, // The angle at which rain falls; the orientation of the glyph grid
resolution: 1, // An overall scale multiplier
useHalfFloat: false,
renderer: "webgpu", // The preferred web graphics API
};
const versions = {
@@ -205,6 +206,30 @@ const versions = {
{ hsl: [0.1, 1.0, 0.9], at: 1.0 },
],
},
holoplay: {
...defaults,
...fonts.resurrections,
numColumns: 40,
fallSpeed: 0.35,
cycleStyle: "cycleRandomly",
cycleSpeed: 0.8,
glyphEdgeCrop: 0.1,
paletteEntries: [
{ hsl: [0.39, 0.9, 0.0], at: 0.0 },
{ hsl: [0.39, 1.0, 0.6], at: 0.5 },
{ hsl: [0.39, 1.0, 1.0], at: 1.0 },
],
raindropLength: 1.4,
highPassThreshold: 0.2,
cursorEffectThreshold: 0.8,
renderer: "regl",
bloomSize: 0,
volumetric: true,
forwardSpeed: 0,
density: 3,
},
};
versions.throwback = versions.operator;
versions["1999"] = versions.operator;
@@ -247,6 +272,7 @@ const paramMapping = {
stripeColors: { key: "stripeColors", parser: (s) => s },
backgroundColor: { key: "backgroundColor", parser: (s) => s.split(",").map(parseFloat) },
volumetric: { key: "volumetric", parser: (s) => s.toLowerCase().includes("true") },
renderer: { key: "renderer", parser: (s) => s },
};
paramMapping.dropLength = paramMapping.raindropLength;
paramMapping.angle = paramMapping.slant;