https://github.com/actnwit/shaderity-node
Shaderity - a shader utility
https://github.com/actnwit/shaderity-node
Last synced: 11 months ago
JSON representation
Shaderity - a shader utility
- Host: GitHub
- URL: https://github.com/actnwit/shaderity-node
- Owner: actnwit
- License: mit
- Created: 2020-02-05T12:57:22.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-08T20:34:45.000Z (over 3 years ago)
- Last Synced: 2024-05-28T19:07:13.524Z (about 2 years ago)
- Language: TypeScript
- Size: 204 KB
- Stars: 0
- Watchers: 8
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# shaderity-node
shaderity-node is the core part of the shaderity-loader.
The main feature of this library is the following.
1. If there is a description "#pragma shaderity: require(path)" in the shader code file, substitute the contents of the file in (argument resourcePath)/(path) into it. There is a sample in "How to use".
2. Determines if it is a vertex shader or fragment shader from the extension.
## How to use
You can use this via [shaderity-loader](https://github.com/actnwit/shaderity-loader).
Sample of feature 1:
Suppose you have two files in the same folder, as shown below.
test.glsl
``` glsl
#pragma shaderity: require(./version.glsl)
void main(){}
```
version.glsl
``` glsl
#version 100
```
If you use the requireFile method of this library to read test.glsl, it will load as follows:
```glsl
#version 100
void main(){}
```
## LICENSE
MIT License