Last active
July 3, 2021 14:47
-
-
Save solsarratea/88f89f2993cf09a198825b45dc358aab to your computer and use it in GitHub Desktop.
GLSL viewer for cosine frequencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copy following code at: https://thebookofshaders.com/edit.php | |
// Author: sol sarratea | |
// Title: DCT exploration | |
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform vec2 u_resolution; | |
uniform vec2 u_mouse; | |
uniform float u_time; | |
void main() { | |
vec2 p = gl_FragCoord.xy/u_resolution.xy*2.-1.; | |
p.x *= u_resolution.x/u_resolution.y; | |
vec3 color; | |
// Horizontal frequencies | |
// color += cos(p.x*mix(0.,8.,-0.936))*1.; | |
// Vertical frequencies | |
// color += cos(p.y*mix(0.,8.,0.))*1.; | |
// Mixing cosine waves | |
//color += mix(cos(p.x*0.+u_time),cos(p.y*10.+u_time),0.5); | |
gl_FragColor = vec4(color,1.0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment