mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-14 12:29:30 -07:00
Renaming the data texture to "state" in the rain pass's render program
This commit is contained in:
@@ -135,7 +135,7 @@ export default (regl, config) => {
|
||||
uniforms: {
|
||||
...renderUniforms,
|
||||
|
||||
lastState: doubleBuffer.front,
|
||||
state: doubleBuffer.front,
|
||||
glyphTex: msdf.texture,
|
||||
|
||||
camera: regl.prop("camera"),
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#endif
|
||||
precision lowp float;
|
||||
|
||||
uniform sampler2D lastState;
|
||||
uniform sampler2D state;
|
||||
uniform float numColumns, numRows;
|
||||
uniform sampler2D glyphTex;
|
||||
uniform float glyphHeightToWidth, glyphSequenceLength, glyphTextureColumns, glyphEdgeCrop;
|
||||
@@ -42,7 +42,7 @@ void main() {
|
||||
uv.y -= 0.5;
|
||||
float radius = length(uv);
|
||||
float angle = atan(uv.y, uv.x) / (2. * PI) + 0.5;
|
||||
uv = vec2(angle * 4. - 0.5, 1.5 - pow(radius, 0.5) * 1.5);
|
||||
uv = vec2(fract(angle * 4. - 0.5), 1.5 * (1. - sqrt(radius)));
|
||||
} else {
|
||||
// Applies the slant and scales space so the viewport is fully covered
|
||||
uv = vec2(
|
||||
@@ -54,7 +54,7 @@ void main() {
|
||||
}
|
||||
|
||||
// Unpack the values from the data texture
|
||||
vec4 glyph = volumetric ? vGlyph : texture2D(lastState, uv);
|
||||
vec4 glyph = volumetric ? vGlyph : texture2D(state, uv);
|
||||
float brightness = glyph.r;
|
||||
float symbolIndex = getSymbolIndex(glyph.g);
|
||||
float quadDepth = glyph.b;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#define PI 3.14159265359
|
||||
precision lowp float;
|
||||
attribute vec2 aPosition, aCorner;
|
||||
uniform sampler2D lastState;
|
||||
uniform sampler2D state;
|
||||
uniform float density;
|
||||
uniform vec2 quadSize;
|
||||
uniform float glyphHeightToWidth, glyphVerticalSpacing;
|
||||
@@ -24,7 +24,7 @@ highp float rand( const in vec2 uv ) {
|
||||
void main() {
|
||||
|
||||
vUV = (aPosition + aCorner) * quadSize;
|
||||
vGlyph = texture2D(lastState, aPosition * quadSize);
|
||||
vGlyph = texture2D(state, aPosition * quadSize);
|
||||
|
||||
// Calculate the world space position
|
||||
float quadDepth = 0.0;
|
||||
|
||||
Reference in New Issue
Block a user