Gets the attribute compositions required by this shader part. DiscardShader doesn't require any specific attribute compositions.
Empty array of composition type enums
Gets the attribute names required by this shader part. DiscardShader doesn't require any specific vertex attributes.
Empty array of attribute names
Gets the vertex attribute semantics required by this shader part. DiscardShader doesn't require any specific vertex attribute semantics.
Empty array of vertex attribute enums
Gets the vertex shader body code. Currently returns empty string as no additional vertex processing is needed.
Empty shader body string
Generates variable assignment statement with proper type declaration. Creates appropriate syntax for both WebGL (GLSL) and WebGPU (WGSL) based on the current process approach.
The engine instance
The name of the variable to declare
The socket containing type and default value information
The variable assignment statement string
Generates varying variable assignment statement for fragment/pixel shaders. Creates code to read varying variables passed from vertex shader with proper type declaration.
The engine instance
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
Generates 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
Generates the main function ending code for vertex or fragment shaders. Handles differences between WebGL (GLSL) and WebGPU (WGSL) shader languages.
The engine instance
True if generating code for vertex shader, false for fragment shader
The shader code string for the main function ending
Generates 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.
The engine instance
The complete fragment shader prerequisites code string
Gets the pixel/fragment shader body code. Currently returns empty string as no additional fragment processing is needed.
Empty shader body string
Gets the pixel/fragment shader function definitions for conditional discard. Returns appropriate function definition based on the current process approach (WebGL/WebGPU).
Shader code string containing the conditionalDiscard function definition
Generates vertex shader prerequisites for Raymarching shader.
The engine instance
The complete vertex shader prerequisites code string for Raymarching shader
Gets the vertex shader function definitions. Returns a no-op function since discard is not available in vertex shaders.
Shader code string containing a no-op conditionalDiscard function
StaticgetGets the singleton instance of DiscardShader. Creates a new instance if one doesn't exist.
The singleton DiscardShader instance
OutDistanceShader class provides the out distance function for fragment shaders. This class handles outputting the distance to the surface, supporting both WebGL and WebGPU rendering approaches.