Skip to content

Instantly share code, notes, and snippets.

@0xf0f0f0
Created October 19, 2020 12:51
Show Gist options
  • Select an option

  • Save 0xf0f0f0/dd5214e31f650d3a3657804b4f9466eb to your computer and use it in GitHub Desktop.

Select an option

Save 0xf0f0f0/dd5214e31f650d3a3657804b4f9466eb to your computer and use it in GitHub Desktop.
const vertexShader = () => `
varying vec2 vUv;
void main() {
vUv = uv;
gl_Position = vec4( position, 1. );
}
`;
const fragmentShader = () => `
varying vec2 vUv;
uniform vec3 color1;
uniform vec3 color2;
uniform float time;
void main() {
gl_FragColor = vec4( mix( color1, color2, vUv.y ), 1. );
}
`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment