Created
October 19, 2020 12:51
-
-
Save 0xf0f0f0/dd5214e31f650d3a3657804b4f9466eb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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