summaryrefslogtreecommitdiffstats
path: root/src/shader.frag
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2024-06-14 00:10:58 +0300
committergramanas <anastasis.gramm2@gmail.com>2024-06-14 00:10:58 +0300
commit5c2677df733fc7f8a5d12ae3d0e1e648566db2bb (patch)
tree2f5dc7d30a16b4751ae68b2a1d3a641613ba4206 /src/shader.frag
parenteb5d40f92c6d2d1d7491c350cbdcef2e8bf96e06 (diff)
downloadcgame-5c2677df733fc7f8a5d12ae3d0e1e648566db2bb.tar.gz
cgame-5c2677df733fc7f8a5d12ae3d0e1e648566db2bb.tar.bz2
cgame-5c2677df733fc7f8a5d12ae3d0e1e648566db2bb.zip
VMA initial integration
Diffstat (limited to 'src/shader.frag')
-rw-r--r--src/shader.frag13
1 files changed, 9 insertions, 4 deletions
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() {