omega-game-engine
    Preparing search index...

    Represents a shader specifically designed for rendering objects with an unlit material. It handles uniforms for color, texture, and UV transformations. *

    Hierarchy (View Summary)

    Indexable

    • [key: string]: any
    Index

    Constructors

    Properties

    _buffers: WebGLBuffers = ...
    _className: string = "UnlitShader"
    _serializationIgnoreKeys: string[]
    _shaderProgram: WebGLProgram
    _uuid: string
    fragmentSource: null | string = null
    fragUri: string = ShaderSources.frag.color
    gl: WebGL2RenderingContext

    The WebGL2 rendering context. *

    material: UnlitMaterial

    The unlit material.

    name: string = ''
    vertexSource: null | string = null
    vertexUri: string = ShaderSources.vertex.default
    SHADER_FUNCTIONS: { [key: string]: string } = ...

    A map of string keys to URLs for reusable shader function files. *

    Accessors

    • get initialized(): boolean

      Returns boolean

    • get shaderProgram(): WebGLProgram

      Returns WebGLProgram

    Methods

    • Deserializes the object from a JSON-compatible data structure.

      • This method is intended to be overridden by subclasses to handle their specific properties.

      Parameters

      Returns void

    • Loads the unlit material's properties into the shader's uniforms.

      • This includes the base color, UV scale and offset, and the main texture.

      Returns Promise<void>