Ajout du noise

This commit is contained in:
2026-04-21 01:08:11 +02:00
parent 3d5bef4153
commit 4a1c77121b
6 changed files with 121 additions and 13 deletions
+8 -1
View File
@@ -1,3 +1,10 @@
uniform highp vec2 uWindowSize;
uniform sampler2D uVideoSampler;
uniform sampler2D uNoiseSampler;
uniform lowp vec4 uRandom;
void main() {
gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
gl_FragColor = texture2D(uVideoSampler, gl_FragCoord.xy/uWindowSize.xy)
+ (texture2D(uNoiseSampler, (gl_FragCoord.xy/vec2(128, 128))+uRandom.zw) - 0.75)
* texture2D(uNoiseSampler, (gl_FragCoord.xy/vec2(128, 128))+uRandom.xw);
}