can write to any location

This commit is contained in:
2025-09-15 10:14:59 +02:00
parent 01aafa4dd4
commit fdf352eb8b
3 changed files with 15 additions and 13 deletions
+2 -2
View File
@@ -3,7 +3,7 @@
uniform float iTime;
uniform vec2 iResolution;
in vec2 vUV;
out vec3 fragColor;
layout(location = 0) out vec3 fragColor;
uniform sampler2D frame0;
void main() {
@@ -12,5 +12,5 @@ void main() {
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.01).xyz * 0.5;
fragColor = color + texture(frame0, vUV - 0.04).xyz * 0.5;
}