Skip to main content

ShaderOptions

Index

Properties

fragmentSource

fragmentSource: string

Fragment shader source code in glsl #version 300 es

graphicsContext

graphicsContext: ExcaliburGraphicsContext

ExcaliburGraphicsContextWebGL this layout will be attached to, these cannot be reused across webgl contexts.

optionalimages

images?: Record<string, ImageSource>

Set initial images as uniform sampler2D

optionalname

name?: string

Optionally provide a name for the shader (useful for debugging purposes)

optionalonPostCompile

onPostCompile?: (shader: Shader) => void

Callback to fire directly after the progam has finished compiling


Type declaration

    • Callback to fire directly after the progam has finished compiling


      Parameters

      Returns void

optionalonPreLink

onPreLink?: (program: WebGLProgram) => void

Callback to fire directly before linking the program


Type declaration

    • (program: WebGLProgram): void
    • Callback to fire directly before linking the program


      Parameters

      • program: WebGLProgram

      Returns void

optionalstartingTextureSlot

startingTextureSlot?: number

Optionally set the starting texture slot, default 0

optionaluniforms

Set initial uniforms

vertexSource

vertexSource: string

Vertex shader source code in glsl #version 300 es