Options
Menu

Class LightingCompiler

CompilerBase is an abstract base class for shader compilers that use modular shader methods to assemble a material. Concrete subclasses are used by the default materials.

see

away.materials.ShadingMethodBase

Hierarchy

  • CompilerBase

Index

Constructors

constructor

  • Creates a new CompilerBase object.

    Parameters

    Returns LightingCompiler

Properties

_dirLightFragmentConstants

_dirLightFragmentConstants: Array<ShaderRegisterElement>

_dirLightVertexConstants

_dirLightVertexConstants: Array<ShaderRegisterElement>

Protected _elementsClass

_elementsClass: IElementsClassGL

Protected _fragmentCode

_fragmentCode: string

_pNumProbeRegisters

_pNumProbeRegisters: number

_pointLightFragmentConstants

_pointLightFragmentConstants: Array<ShaderRegisterElement>

_pointLightVertexConstants

_pointLightVertexConstants: Array<ShaderRegisterElement>

Protected _postAnimationFragmentCode

_postAnimationFragmentCode: string

Protected _registerCache

_registerCache: ShaderRegisterCache

Protected _renderPass

_renderPass: IPass

Protected _shader

_shader: ShaderBase

Protected _sharedRegisters

_sharedRegisters: ShaderRegisterData

Protected _vertexCode

_vertexCode: string

fragmentCode

fragmentCode: string

The generated fragment code.

postAnimationFragmentCode

postAnimationFragmentCode: string

The generated fragment code.

registerCache

registerCache: ShaderRegisterCache

The shared registers.

sharedRegisters

sharedRegisters: ShaderRegisterData

The shared registers.

vertexCode

vertexCode: string

The generated vertex code.

Methods

compile

  • compile(): void
  • Compiles the code after all setup on the compiler has finished.

    Returns void

compileNormalCode

  • compileNormalCode(): void
  • Calculate the normal.

    Returns void

compileViewDirCode

  • compileViewDirCode(): void
  • Calculate the view direction.

    Returns void

dispose

  • dispose(): void
  • Disposes all resources used by the compiler.

    Returns void

pCompileDependencies

  • pCompileDependencies(): void
  • Compile the code for the methods.

    Returns void

pCompileShadowCode

  • pCompileShadowCode(): void
  • Provides the code to provide shadow mapping.

    Returns void

pInitRegisterIndices

  • pInitRegisterIndices(): void
  • Reset all the indices to "unused".

    Returns void

Generated using TypeDoc