Skip to content

Instantly share code, notes, and snippets.

@hugohil
Created October 11, 2022 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hugohil/0521d7fe0ef41497158e2feabc2c2a9a to your computer and use it in GitHub Desktop.
Save hugohil/0521d7fe0ef41497158e2feabc2c2a9a to your computer and use it in GitHub Desktop.
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