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:
Rezmason
2022-09-04 23:56:49 -07:00
parent 1aeaba7a3f
commit 33edffc99c
9 changed files with 4 additions and 148 deletions

View File

@@ -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) {

View File

@@ -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);