Gets the composition types for each vertex attribute used by this shader part. Must be implemented by concrete subclasses to define the data composition (scalar, vec2, vec3, etc.).
Array of composition type enums defining the data structure
Gets the attribute names used by this shader part. Must be implemented by concrete subclasses to define which vertex attributes are used.
Object containing attribute name mappings
Gets the vertex attribute semantics used by this shader part. Must be implemented by concrete subclasses to define the semantic meaning of each attribute.
Array of vertex attribute enums defining the semantics
Gets the pixel/fragment shader definitions code. Must be implemented by concrete subclasses to provide shader-specific definitions.
Fragment shader definitions code string
Gets the vertex shader definitions code. Must be implemented by concrete subclasses to provide shader-specific definitions.
Vertex shader definitions code string
Static
getGenerates variable assignment statement with proper type declaration. Creates appropriate syntax for both WebGL (GLSL) and WebGPU (WGSL) based on the current process approach.
The name of the variable to declare
The socket containing type and default value information
The variable assignment statement string
Static
getGenerates varying variable assignment statement for fragment/pixel shaders. Creates code to read varying variables passed from vertex shader with proper type declaration.
The name of the variable to declare
The socket containing type information
The shader node that provides the varying variable
The varying variable assignment statement string for fragment shader
Static
getGenerates varying variable assignment statement for vertex shaders. Creates code to write varying variables that will be passed to fragment shader.
The shader node that provides the varying variable
Array of variable names to assign
Index of the current variable in the varNames array
The varying variable assignment statement string for vertex shader
Static
getGenerates the main function beginning code for vertex or fragment shaders. Handles differences between WebGL (GLSL) and WebGPU (WGSL) shader languages.
True if generating code for vertex shader, false for fragment shader
The shader code string for the main function beginning
Static
getGenerates the main function ending code for vertex or fragment shaders. Handles differences between WebGL (GLSL) and WebGPU (WGSL) shader languages.
True if generating code for vertex shader, false for fragment shader
The shader code string for the main function ending
Static
getStatic
getGenerates fragment/pixel shader prerequisites including definitions and varying variable declarations. Creates appropriate code for both WebGL (GLSL) and WebGPU (WGSL) based on the current process approach.
Array of shader nodes used to generate varying variables for WebGPU
The complete fragment shader prerequisites code string
Static
getGenerates vertex shader prerequisites including definitions, vertex inputs, and uniform declarations. Creates appropriate code for both WebGL (GLSL) and WebGPU (WGSL) based on the current process approach.
Array of shader nodes used to generate varying variables for WebGPU
The complete vertex shader prerequisites code string
Abstract base class that provides common shader functionality for both WebGL and WebGPU rendering approaches. This class handles shader code generation, vertex/fragment shader prerequisites, and cross-platform compatibility between WebGL and WebGPU shader languages (GLSL and WGSL).