• Public
  • Public/Protected
  • All

Interface IEffectCreationOptions

Options to be used when creating an effect.


  • IEffectCreationOptions



attributesSearch playground for attributes

attributes: string[]

Attributes that will be used in the shader.

definesSearch playground for defines

defines: any

Define statements that will be set in the shader.

fallbacksSearch playground for fallbacks

Possible fallbacks for this effect to improve performance when needed.

Optional indexParametersSearch playground for indexParameters

indexParameters: any

Parameters to be used with Babylons include syntax to iterate over an array (eg. {lights: 10})

Optional maxSimultaneousLightsSearch playground for maxSimultaneousLights

maxSimultaneousLights: number

Max number of lights that can be used in the shader.

Optional multiTargetSearch playground for multiTarget

multiTarget: boolean

Is this effect rendering to several color attachments ?

onCompiledSearch playground for onCompiled

onCompiled: Nullable<(effect: Effect) => void>

Callback that will be called when the shader is compiled.

onErrorSearch playground for onError

onError: Nullable<(effect: Effect, errors: string) => void>

Callback that will be called if an error occurs during shader compilation.

Optional processFinalCodeSearch playground for processFinalCode

processFinalCode: Nullable<(shaderType: string, code: string) => string>

If provided, will be called two times with the vertex and fragment code so that this code can be updated before it is compiled by the GPU

samplersSearch playground for samplers

samplers: string[]

Sampler texture variable names that will be set in the shader.

Optional shaderLanguageSearch playground for shaderLanguage

shaderLanguage: ShaderLanguage

The language the shader is written in (default: GLSL)

Optional transformFeedbackVaryingsSearch playground for transformFeedbackVaryings

transformFeedbackVaryings: Nullable<string[]>

uniformBuffersNamesSearch playground for uniformBuffersNames

uniformBuffersNames: string[]

Uniform buffer variable names that will be set in the shader.

uniformsNamesSearch playground for uniformsNames

uniformsNames: string[]

Uniform variable names that will be set in the shader.


  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method