Static
createCreates a complete fragment/pixel shader code from the given pixel nodes. This method performs topological sorting, generates function definitions, and constructs the main shader body for fragment processing.
Array of shader nodes that contribute to fragment processing
Whether to generate a full version with all prerequisites and boilerplate
Complete fragment shader code as a string, or undefined if generation fails
Static
createCreates a complete vertex shader code from the given vertex and varying nodes. This method performs topological sorting of nodes, generates function definitions, and constructs the main shader body with proper variable declarations and connections.
Array of shader nodes that contribute to vertex processing
Array of shader nodes that pass data from vertex to fragment stage
Whether to generate a full version with all prerequisites and boilerplate
Complete vertex shader code as a string, or undefined if generation fails
Static
generateGenerates complete vertex and fragment shader code from a JSON shader node graph definition. This is the main entry point for converting a serialized shader graph into executable shader code. The method performs the full pipeline: node construction, dependency resolution, stage assignment, and final code generation.
JSON representation of the shader node graph containing nodes and connections
Object containing both vertex and fragment shader code, or undefined if generation fails
ShaderGraphResolver is a class that resolves the shader node graph and generates shader code. It provides functionality to convert a graph of shader nodes into complete vertex and fragment shaders.