mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-17 22:09:28 -07:00
Removing the "resurrection" effect that mirrored the Matrix Resurrections trailers, as they aren't canon and the color channels of the output textures can be put to better use
This commit is contained in:
@@ -9,7 +9,6 @@ uniform mat4 camera, transform;
|
||||
uniform vec2 screenSize;
|
||||
uniform float time, animationSpeed, forwardSpeed;
|
||||
uniform bool volumetric;
|
||||
uniform float resurrectingCodeRatio;
|
||||
varying vec2 vUV;
|
||||
varying vec3 vChannel;
|
||||
varying vec4 vGlyph;
|
||||
@@ -34,13 +33,7 @@ void main() {
|
||||
vec2 position = (aPosition * vec2(1., glyphVerticalSpacing) + aCorner * vec2(density, 1.)) * quadSize;
|
||||
vec4 pos = vec4((position - 0.5) * 2.0, quadDepth, 1.0);
|
||||
|
||||
// "Resurrected" columns are in the green channel,
|
||||
// and are vertically flipped (along with their glyphs)
|
||||
vChannel = vec3(1.0, 0.0, 0.0);
|
||||
if (volumetric && rand(vec2(aPosition.x, 0)) < resurrectingCodeRatio) {
|
||||
pos.y = -pos.y;
|
||||
vChannel = vec3(0.0, 1.0, 0.0);
|
||||
}
|
||||
|
||||
// Convert the world space position to screen space
|
||||
if (volumetric) {
|
||||
|
||||
@@ -7,7 +7,6 @@ struct Config {
|
||||
glyphSequenceLength : i32,
|
||||
glyphTextureGridSize : vec2<i32>,
|
||||
glyphHeightToWidth : f32,
|
||||
resurrectingCodeRatio : f32,
|
||||
gridSize : vec2<f32>,
|
||||
showComputationTexture : i32,
|
||||
|
||||
@@ -344,13 +343,7 @@ fn computeResult (isFirstFrame : bool, previousResult : vec4<f32>, glyphPos : ve
|
||||
worldPosition /= quadGridSize;
|
||||
worldPosition = (worldPosition - 0.5) * 2.0;
|
||||
|
||||
// "Resurrected" columns are in the green channel,
|
||||
// and are vertically flipped (along with their glyphs)
|
||||
var channel = vec3<f32>(1.0, 0.0, 0.0);
|
||||
if (volumetric && randomFloat(vec2<f32>(quadPosition.x, 0.0)) < config.resurrectingCodeRatio) {
|
||||
worldPosition.y = -worldPosition.y;
|
||||
channel = vec3<f32>(0.0, 1.0, 0.0);
|
||||
}
|
||||
|
||||
// Convert the vertex's world space position to screen space
|
||||
var screenPosition = vec4<f32>(worldPosition, quadDepth, 1.0);
|
||||
|
||||
Reference in New Issue
Block a user