Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ShaderSpec

Hierarchy

  • ShaderSpec

Index

Properties

attribs

Attribute type declarations.

Optional declPrefixes

declPrefixes: Partial<GLSLDeclPrefixes>

Variable naming convention variable prefixes for GLSL code gen.

Defaults:

  • Attributes: a_
  • Varying: v_
  • Uniforms: u_
  • Outputs: o_

Optional ext

ext: Partial<Record<keyof WebGLExtensionMap, ExtensionBehavior>>

WebGL extension config for code generation. Keys in this object are extension names and their values specify the desired behavior. Boolean values will be translated in "enable" / "disable".

fs

fs: string | ShaderFn

Fragment shader GLSL source code.

Optional generateDecls

generateDecls: boolean

Flag to indicate code generation for attribs, varying, uniforms and outputs. Default: true.

Optional outputs

WebGL2 only. Fragment shader output variable type declarations. Default: { fragColor: GLSL.vec4 }

Optional post

post: string

Optional source code to be appended after main shader code.

Optional pre

pre: string

Optional prelude source, prepended before main shader code, the default prelude (unless disabled) and any other generated code.

Optional replacePrelude

replacePrelude: boolean

If true, disables default prelude. Default: false

Optional state

state: Partial<ShaderState>

Optional shader drawing state flags. Default: none.

Optional uniforms

Uniform type declarations with optional defaults.

Optional varying

Varying type declarations.

vs

vs: string | ShaderFn

Vertex shader GLSL source code.

Generated using TypeDoc