Function: preprocess()
preprocess(
source,options?):string
Defined in: lib/preprocessor/preprocessor.ts:30
Removes inactive conditional branches from shader source.
Supports #ifdef, #ifndef, and simple #if expressions using a define name,
!NAME, defined(NAME), !defined(NAME), or a boolean or numeric literal.
Parameters
source
string
Shader source containing luma.gl-supported conditional directives.
options?
PreprocessorOptions
Defines used while evaluating conditional directives.
Returns
string
Shader source with inactive branches removed.