working 6-stage fragments
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#version 460
|
||||
|
||||
uniform float iTime;
|
||||
uniform vec2 iResolution;
|
||||
|
||||
uniform sampler2D frame0;
|
||||
uniform sampler2D frame1;
|
||||
|
||||
in vec2 vUV;
|
||||
layout(location = 3) out vec3 fragColor;
|
||||
|
||||
|
||||
// SRC A
|
||||
// ---------
|
||||
// IN: 0 / 1
|
||||
// OUT: 3
|
||||
|
||||
void main() {
|
||||
vec2 uv0 = vUV.st;
|
||||
float ratio = iResolution.x / iResolution.y;
|
||||
vec2 uv1 = (uv0 - .5) * vec2(ratio, 1);
|
||||
vec3 color = vec3(vUV, sin(iTime * 0.5) * 0.5 + 0.5);
|
||||
color *= 1 - step(cos(iTime) * 0.1 + 0.4, length(uv1));
|
||||
fragColor = color + texture(frame0, vUV - 0.04).xyz * 0.5;
|
||||
}
|
||||
Reference in New Issue
Block a user