glsl-shader-name
Extract a shader's name from its source
Last updated 6 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 (6 years ago)

1 Versions

  • 1.0.0                                ...           6 years ago
Downloads
Today 30
This Week 129
This Month 1,153
Last Day 99
Last Week 465
Last Month 1,881
Dependencies (2)
Dev Dependencies (3)

Copyright 2014 - 2016 © taobao.org |