Skip to content

Instantly share code, notes, and snippets.

@brunosimon
Created October 1, 2019 08:52
Show Gist options
  • Save brunosimon/b136ca7418aa90fb10230ba364adcab0 to your computer and use it in GitHub Desktop.
Save brunosimon/b136ca7418aa90fb10230ba364adcab0 to your computer and use it in GitHub Desktop.
Basic Three.js shaders
// Vertex
void main()
{
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
}
// Fragment
void main()
{
gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment