Skip to content

jackstrosahl/glsl-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GLSL Template

Minimal setup for writing shaders, including:

✅ Live reloading dev server via npm start from budo

✅ Export for the web / GitHub pages via npm run build, e.g this repo's site

glslify for importing packages in GLSL

regl for simpler JS (check out index.js)

✅ Ready to make shader toys!

  • Javascript to setup our canvas and load the shaders, no changes needed: index.js
  • Simple vertex shader passing along its position, no changes needed: vert.glsl
  • Example fragment shader to get started: frag.glsl

Usage

  1. Make a repo from this template from the link above, or here
  2. Clone your repo, and set the working directory there
  3. Install dependencies:
npm i
npm i -g browserify
npm i -g budo
  1. Start the development server with npm start
  2. Edit index.js, frag.glsl, and vert.glsl
  3. Use npm run build to export your final result to the docs directory
  4. Enable GitHub pages on the main branch's docs directory to put your result on the web