Adding "updated" glyph set from The Matrix Resurrections, and a corresponding effect version.

This commit is contained in:
Rezmason
2021-12-11 22:21:24 -08:00
parent 508c941fcd
commit 25e9f10f69
5 changed files with 28 additions and 15 deletions

View File

@@ -7,6 +7,7 @@
- [Classic Matrix code](https://rezmason.github.io/matrix)
- [3D mode](https://rezmason.github.io/matrix?volumetric=true)
- [Matrix Resurrections code (WIP)](https://rezmason.github.io/matrix?version=resurrections)
- [Matrix Resurrections's updated code (WIP)](https://rezmason.github.io/matrix?version=updated)
- [Operator Matrix code (with ripple effects)](https://rezmason.github.io/matrix?version=operator)
- [Code of the "Nightmare Matrix"](https://rezmason.github.io/matrix?version=nightmare)
- [(you know, this stuff).](http://matrix.wikia.com/wiki/Nightmare_Matrix)

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

View File

@@ -17,6 +17,12 @@ const fonts = {
glyphSequenceLength: 57,
glyphTextureGridSize: [8, 8],
},
resurrections: {
// The glyphs seen in the film trilogy
glyphTexURL: "assets/resurrections_msdf.png",
glyphSequenceLength: 133,
glyphTextureGridSize: [13, 12],
},
huberfishA: {
glyphTexURL: "assets/huberfish_a_msdf.png",
glyphSequenceLength: 34,
@@ -149,6 +155,23 @@ const versions = {
volumetric: true,
fallSpeed: 0.4,
},
updated: {
...defaults,
...fonts.resurrections,
numColumns: 108,
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,
},
palimpsest: {
...defaults,
...fonts.huberfishA,

View File

@@ -117,15 +117,4 @@ const makePass = (loaded, build, run) => ({
const makePipeline = (context, steps) => steps.filter((f) => f != null).map((f) => f(context));
export {
getCanvasSize,
makeRenderTarget,
makeComputeTarget,
make1DTexture,
loadTexture,
loadShader,
makeUniformBuffer,
makePass,
makePipeline,
makeBindGroup,
};
export { getCanvasSize, makeRenderTarget, makeComputeTarget, make1DTexture, loadTexture, loadShader, makeUniformBuffer, makePass, makePipeline, makeBindGroup };

View File

@@ -24,9 +24,9 @@ float median3(vec3 i) {
}
vec2 getSymbolUV(float glyphCycle) {
float symbol = floor(glyphSequenceLength * glyphCycle);
float symbolX = mod(symbol, glyphTextureGridSize.x);
float symbolY = floor(symbol / glyphTextureGridSize.y);
float symbol = floor((glyphSequenceLength) * glyphCycle) + 1.0;
float symbolX = mod(symbol, glyphTextureGridSize.x) - 1.0;
float symbolY = glyphTextureGridSize.y - 1.0 - (mod(floor(symbol / glyphTextureGridSize.x), glyphTextureGridSize.y));
return vec2(symbolX, symbolY);
}