From 5c2677df733fc7f8a5d12ae3d0e1e648566db2bb Mon Sep 17 00:00:00 2001 From: gramanas Date: Fri, 14 Jun 2024 00:10:58 +0300 Subject: VMA initial integration --- src/shader.frag | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/shader.frag') diff --git a/src/shader.frag b/src/shader.frag index 3e80e21..c29a640 100644 --- a/src/shader.frag +++ b/src/shader.frag @@ -55,10 +55,15 @@ float fbm(vec2 p) { } void main() { - vec2 uv = gl_FragCoord.xy / ubo.resolution.xy; - vec2 p = uv * 2.0 - vec2(1.0); - float n = fbm(p * 5.0 - vec2(0.0, ubo.time * 2.0)); - outColor = vec4(n, n * 0.5, 0.0, 1.0) * vec4(texture(texSampler, fragTexCoord).rgb, 1.0); + vec2 uv = gl_FragCoord.xy / ubo.resolution.xy; + vec2 p = uv * 2.0 - vec2(1.0); + float n = fbm(p * 5.0 - vec2(0.0, ubo.time * 2.0)); + // outColor = vec4(n, n * 0.5, 0.0, 1.0) * vec4(texture(texSampler, fragTexCoord).rgb, 1.0); + if (mod(gl_FragCoord.x, 20) > 19 || mod(gl_FragCoord.y, 20) > 19) { + outColor = vec4(0,0,0, 1); + } else { + outColor = vec4(n, n * 0.5, 0.0, 1.0); + } } // void main() { -- cgit v1.2.3