Created
November 2, 2020 21:50
-
-
Save riklomas/72b7a4129726201159126a64ac94c2be to your computer and use it in GitHub Desktop.
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
#ifdef GL_ES | |
precision highp float; | |
#endif | |
uniform float time; | |
uniform vec2 resolution; | |
uniform vec2 mouse; | |
uniform vec3 spectrum; | |
uniform sampler2D texture0; | |
uniform sampler2D texture1; | |
uniform sampler2D texture2; | |
uniform sampler2D texture3; | |
uniform sampler2D prevFrame; | |
uniform sampler2D prevPass; | |
varying vec3 v_normal; | |
varying vec2 v_texcoord; | |
void main(void) | |
{ | |
vec2 uv = v_texcoord; | |
float red = 0.5 + 0.5 * sin(time * 1.0 + uv.x * 3.0 + uv.y * 0.0); | |
float green = 0.5 + 0.5 * sin(time * 0.5 + uv.x * 0.0 + uv.y * 3.0); | |
float blue = 0.5 + 0.5 * sin(time * 0.75 + uv.x * 2.0 + uv.y * 2.0); | |
gl_FragColor = vec4( | |
red * (1.0 - spectrum.x * .2), | |
green * (1.0 - spectrum.y * .2), | |
blue, | |
1.0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment