A simulator for OpenGL ES 1.0 Shader Language written in JavaScript.
JavaScript Makefile CSS C
Latest commit 6d8c5fe Dec 11, 2014 Brian J. Burg Update pages for the presentation demo.
Failed to load latest commit information.
demo Update pages for the presentation demo. Dec 11, 2014
docs Move ./lib/runtime/ contents around. Clean up runtime.js. Dec 3, 2014
lib runtime: remove trivial uses of |arguments| to take 50x50 runtime fro… Dec 11, 2014
test/runtime implement linear interpolation of texture lookup Dec 10, 2014
.gitattributes Add auxiliary files. Nov 19, 2014
.gitignore Convert parser, AST, visitor code to use modules. Add a build script … Nov 26, 2014
AUTHORS Add auxiliary files. Nov 19, 2014
Makefile Fix missing imports and build dependency order. Dec 9, 2014
README Update README Dec 6, 2014


# Target

`glsl-simulator` is a JavaScript compiler and runtime for GLSL shaders. It is designed to provide (browser) developer tools with the runtime information necessary to implement features such as stepping through shader control flow, introspecting live state and logging. As such, it is currently designed to run in a full browser environment. However, the development environment makes use of NodeJS.

# Dependencies

`glsl-simulator` requires NodeJS, npm, and the npm packages `pegjs` and `uglify-js`. To satisfy the latter dependencies, run

    $ npm install pegjs uglify-js

To combine the script resources:

    $ make

# Running

Currently, the project is exercised through several demo pages. See the `demo/` directory.

To use `glsl-simulator` from another (browser) code base, run `make` and use the resulting library in the `browser/` build directory.

# Hacking

`glsl-simulator` uses a PEG.js grammar to parse the OpenGL ES 2.0 Shader Language (GLSL).
Usually the generated grammar is also checked into the repository. To change the grammar
and regenerate the JavaScript parser, you need to run `make`.