wowserhq / wowser

World of Warcraft in the browser using JavaScript and WebGL
MIT License
240 stars 63 forks source link

Add glslify-import to glslify-loader #135

Closed fallenoak closed 8 years ago

fallenoak commented 8 years ago

GLSL, especially when writing several similar shaders to minimize runtime branching, is prone to code duplication.

Fortunately, someone has written a glslify transform called glslify-import. It extends glslify #pragma directives with support for import(path). Imported source still goes through the glslify transform pipeline.

In order to use glslify-import with Webpack, we'll need to switch to a slightly modified version of glslify-loader that includes support for query parameters.

fallenoak commented 8 years ago

Fixed by https://github.com/wowserhq/wowser/pull/141