summaryrefslogtreecommitdiffstats
path: root/src/shader.frag
diff options
context:
space:
mode:
authorgrm <grm@eyesin.space>2024-06-14 00:10:58 +0300
committergrm <grm@eyesin.space>2024-06-14 00:10:58 +0300
commit4eee806316b8993dd54da2410274a4662ed3690e (patch)
tree2f5dc7d30a16b4751ae68b2a1d3a641613ba4206 /src/shader.frag
parent1a6f8e62cb9eba6988c780a45c54509a762644c5 (diff)
downloadcgame-4eee806316b8993dd54da2410274a4662ed3690e.tar.gz
cgame-4eee806316b8993dd54da2410274a4662ed3690e.tar.bz2
cgame-4eee806316b8993dd54da2410274a4662ed3690e.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() {