diff --git a/TODO.txt b/TODO.txt index 8c590dd..57115d1 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,5 +1,11 @@ TODO: +Resurrections + Support random glyph order + Support annomaly streaks + Eventually improve expanded new glyph set + Make font + WebGPU Try https://github.com/brendan-duncan/wgsl_reflect Get rid of end pass once it's possible to copy a bgra8unorm to a canvas texture @@ -22,11 +28,6 @@ gpu-buffer, working title Capture expected requirements down the road, make roadmap License it and put it somewhere else -Resurrection - Modified glyph order? - New glyphs? - Good luck with that, champ - Zion Control's matrix variant From Reloaded diff --git a/assets/Matrix-Code.ttf b/assets/Matrix-Code.ttf old mode 100755 new mode 100644 index 85135f9..95a3a5e Binary files a/assets/Matrix-Code.ttf and b/assets/Matrix-Code.ttf differ diff --git a/assets/matrixcode_msdf.png b/assets/matrixcode_msdf.png index d8d112c..54fc8e1 100644 Binary files a/assets/matrixcode_msdf.png and b/assets/matrixcode_msdf.png differ diff --git a/assets/megacity_msdf.png b/assets/megacity_msdf.png new file mode 100644 index 0000000..f43be39 Binary files /dev/null and b/assets/megacity_msdf.png differ diff --git a/assets/resurrections_msdf.png b/assets/resurrections_msdf.png index 2af0b01..a4fd08b 100644 Binary files a/assets/resurrections_msdf.png and b/assets/resurrections_msdf.png differ diff --git a/js/config.js b/js/config.js index eb9b214..a89489d 100644 --- a/js/config.js +++ b/js/config.js @@ -17,6 +17,12 @@ const fonts = { glyphSequenceLength: 57, glyphTextureGridSize: [8, 8], }, + megacity: { + // The glyphs seen in the film trilogy + glyphTexURL: "assets/megacity_msdf.png", + glyphSequenceLength: 64, + glyphTextureGridSize: [8, 8], + }, resurrections: { // The glyphs seen in the film trilogy glyphTexURL: "assets/resurrections_msdf.png", @@ -94,6 +100,9 @@ const defaults = { const versions = { classic: {}, + megacity: { + font: "megacity" + }, operator: { bloomStrength: 0.75, highPassThreshold: 0.0, diff --git a/shaders/glsl/rainPass.frag.glsl b/shaders/glsl/rainPass.frag.glsl index c2ec7e6..f570a97 100644 --- a/shaders/glsl/rainPass.frag.glsl +++ b/shaders/glsl/rainPass.frag.glsl @@ -25,8 +25,9 @@ float median3(vec3 i) { vec2 getSymbolUV(float glyphCycle) { 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)); + float symbolX = mod(symbol, glyphTextureGridSize.x); + float symbolY = mod(floor(symbol / glyphTextureGridSize.x), glyphTextureGridSize.y); + symbolY = glyphTextureGridSize.y - symbolY - 1.0; return vec2(symbolX, symbolY); } diff --git a/shaders/wgsl/rainPass.wgsl b/shaders/wgsl/rainPass.wgsl index eeb5542..fd0c5bd 100644 --- a/shaders/wgsl/rainPass.wgsl +++ b/shaders/wgsl/rainPass.wgsl @@ -377,6 +377,7 @@ fn getSymbolUV(glyphCycle : f32) -> vec2 { var symbol = i32(f32(config.glyphSequenceLength) * glyphCycle); var symbolX = symbol % config.glyphTextureGridSize.x; var symbolY = symbol / config.glyphTextureGridSize.x; + // TODO: make sure this is working properly, it had a bug in the GLSL for a while. return vec2(f32(symbolX), f32(symbolY)); }