Skip to content

Instantly share code, notes, and snippets.

@hugohil
Created October 11, 2022 14:39
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Basic GLSL shaders (three.js)
uniform float time;
uniform vec2 resolution;
uniform vec3 color;
void main() {
gl_FragColor = vec4(color, 1.);
}
varying vec3 vUv;
void main() {
vUv = position;
vec4 modelViewPosition = modelViewMatrix * vec4(position, 1.0);
gl_Position = projectionMatrix * modelViewPosition;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment