glsl-shader-name
Extract a shader's name from its source
Last updated 5 years ago by hughsk .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install glsl-shader-name 
SYNC missed versions from official npm registry.

glsl-shader-name

stable

Extract a shader's name from its source, as specified in @spite's ShaderEditorExtension.

// in plaintext:
#define SHADER_NAME hello world

// or for non-ASCII characters using base64:
#define SHADER_NAME_B64 aGVsbG8gd29ybGQ=

This is a simple pattern for identifying otherwise anonymous shaders in GLSL tooling.

Usage

NPM

name = shaderName(src)

Retrieves the shader name from a GLSL source string src. You may also pass in a list of tokens generated by glsl-tokenizer.

Contributing

See stackgl/contributing for details.

License

MIT. See LICENSE.md for details.

Current Tags

  • 1.0.0                                ...           latest (5 years ago)

1 Versions

  • 1.0.0                                ...           5 years ago
Downloads
Today 6
This Week 401
This Month 1,367
Last Day 75
Last Week 324
Last Month 1,269
Dependencies (2)
Dev Dependencies (3)

Copyright 2014 - 2016 © taobao.org |