Skip to content

Instantly share code, notes, and snippets.

@bhouston
Last active June 9, 2020 23:18
Show Gist options
  • Save bhouston/c2a427a8c5f8873553c34894a5b75e99 to your computer and use it in GitHub Desktop.
Save bhouston/c2a427a8c5f8873553c34894a5b75e99 to your computer and use it in GitHub Desktop.

The capacities of glslify are the following:

#pragma glslify: topDot = require(./my-function.glsl)

It allows for the import of a named function from another class. This likely works in a recursive fashion.


  • It does not allow for inline javascript execution.
  • It does not output JS modules.
  • It does not support tree shaking?

One could create a tagged template literal function for threeify:


glsl`vec3 dot( vec3 a, vec3 b ) { return a . b ; }`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment