neefrehman / ustwo-tech-weekly-glsl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ustwo-tech-weekly-glsl

We'll go through some shader basics and then hopefully freestyle a little!

Getting Started

To get started on your device, fork this repo and run:

yarn && yarn start

Let me know if you run into any problems and I'll help out.

⚠️ Flashing lights and motion

This demo involves manipulating pixels on the canvas, resulting in lots of changing colours and movement. If you are sensitive to either of these then please let me know beforehand, and I can see if we can adapt the demo to tone things down.

Project setup

This project is a simple Preact app bundled with Snowpack/esbuild. The WebGL renderer is adapted form another project of mine. Feel free to take a look at it to see how things work under the hood, but for the purposes of our session we only really care about the src/Scene.tsx file.

Fast refresh dev server workaround

There is an issue with fast refresh that causes production builds to error. I've kept fast refresh (via prefresh) enabled to keep the feedback loop fast, since we'll only be using the dev server in our session. If you want to create a production build I reccommend you comment out the lines that I've marked in snowpack.config.js and .babelrc.

Resources

Some of my fave resources if anyone is interested in learning more about shaders:

License

This repo is GNU Licensed.

About

License:GNU General Public License v3.0


Languages

Language:TypeScript 94.2%Language:JavaScript 2.1%Language:HTML 1.5%Language:CSS 1.3%Language:GLSL 1.0%