a JSON-based shader graph builder for WebGL
Want to see pretty graphs? Log in now!
npm install surfacecurve-shaderbuilder
|17||downloads in the last month|
|Last Published By|
|Version||0.0.5 last updated 6 months ago|
|Keywords||webgl, glsl, shader, shaders|
A JSON-based shader graph builder for WebGL.
The basic architecture is as follows:
- An object is assigned a
- A Material is a shader graph along with it's assigned parameters
- Parameters may consist of explicit values, computed values, or context variables
- The graph is composed of
Nodeobjects which encapsulate a single "function" within the graph
Internally, the system (1) caches shared graphs - i.e. Materials that share the same graph and differ only by parameter, (2) supports explicitly named Materials as well as anonymous derived Materials that vary only by overrides.
Overrides / Overlays
Creates an anonymous Material from a named Material.
Ensures equivalent graphs are reused when only the input parameters, not the underlying code, vary -- thus allowing program reuse.
As a domain-specific language, the ShaderBuilder supports implicit conversions that make sense in the context of a graphical shading language. An obvious convenience conversion would be from RGB to RGBA.
Full list of conversions TBD.
- Other targets (GLSL, C++ ray-tracer lambdas, etc.)