Interface EffectWrapperCreationOptions
allowEmptySourceTexture?: boolean;
attributeNames?: string[];
blockCompilation?: boolean;
defines?: Nullable<string | string[]>;
engine?: AbstractEngine;
extraInitializations?: (useWebGPU: boolean, list: Promise<any>[]) => void;
extraInitializationsAsync?: () => Promise<void>;
fragmentShader?: string;
indexParameters?: any;
name?: string;
onCompiled?: Nullable<(effect: Effect) => void>;
onError?: (effect: Effect, errors: string) => void;
samplerNames?: string[];
samplers?: Nullable<string[]>;
shaderLanguage?: ShaderLanguage;
uniformBuffers?: Nullable<string[]>;
uniformNames?: string[];
uniforms?: Nullable<string[]>;
useAsPostProcess?: boolean;
useShaderStore?: boolean;
vertexShader?: string;
vertexUrl?: string;
}
Hierarchy (View Summary)
- EffectWrapperCreationOptions
Index
Properties
Properties
Optionalallow Empty Source Texture
Sets this property to true if the fragment shader doesn't use a textureSampler texture (default: false).
Optionalattribute Names
Attributes to use in the shader (default: ["position"])
Optionalblock Compilation
If the shader should not be compiled immediately. (default: false)
Optionaldefines
Defines to use in the shader
Optionalengine
Engine to use to create the effect
Optionalextra Initializations
Defines additional code to call to prepare the shader code
Optionalextra Initializations Async
Additional async code to run before preparing the effect
Optionalfragment Shader
Fragment shader for the effect
Optionalindex Parameters
Optionalname
The friendly name of the effect (default: "effectWrapper")
Optionalon Compiled
Callback when effect is compiled
Optionalon Error
Callback when there is an error compiling the effect
Optionalsampler Names
Texture sampler names to use in the shader
Optionalsamplers
Alias for samplerNames. Note that if it is provided, it takes precedence over samplerNames.
Optionalshader Language
The language the shader is written in (default: GLSL)
Optionaluniform Buffers
The list of uniform buffers used in the shader (if any)
Optionaluniform Names
Uniforms to use in the shader
Optionaluniforms
Alias for uniformNames. Note that if it is provided, it takes precedence over uniformNames.
Optionaluse As Post Process
If the effect should be used as a post process (default: false). If true, the effect will be created with a "scale" uniform and a "textureSampler" sampler
Optionaluse Shader Store
Use the shader store instead of direct source code
Optionalvertex Shader
Vertex shader for the effect (default: "postprocess")
Optionalvertex Url
Alias for vertexShader
Options to create an EffectWrapper