Small World Engine API Reference - v0.76.20
    Preparing search index...

    Class WebGL1Renderer

    WebGL 1.0 implementation of the renderer.

    Hierarchy (View Summary)

    Index
    _activeRenderTarget: RenderTarget | null = null
    _bloomPassGL: BloomPassGL | undefined = undefined
    _clearColor: Color = ...

    The clear color of the renderer.

    _frameFar: number = 1000
    _frameNear: number = 0.1

    This frame's camera near/far and raw projection matrix, stashed here so flushPostProcess() (called later, from a pass with no camera parameters of its own) can hand them to HBAO for reconstructing view-space position from the opaque depth buffer. _frameProjMatrix is also handed to WebGLRenderPass.execute() as an explicit parameter every frame (see below) for WebGLClusterCullPass, rather than being a public field passes reach for directly.

    _frameProjMatrix: Float32Array<ArrayBufferLike> | undefined = undefined
    _hdrFbo: WebGLFramebuffer | undefined = undefined
    _hdrRenderBuffer: WebGLRenderbuffer | undefined = undefined
    _hdrTexture: WebGLTexture | undefined = undefined
    _lightData: LightDataInterface = ...

    Cached light data to avoid GC pressure.

    _passes: WebGLRenderPass[] = []
    _postPassGL: PostProcessPassGL | undefined = undefined
    _quality: QualityConfig = ...

    Global quality settings.

    defaultCubeTexture: WebGLTexture
    defaultNormalMap: WebGLTexture
    defaultSpecularMap: WebGLTexture
    defaultTexture: WebGLTexture
    gl: WebGLRenderingContext
    postProcessing: PostProcessingGroup = ...

    The global post processing volume/group.

    type: RendererType = RendererType.WEB_GL1

    The type of the renderer.

    • get webglContext(): WebGLRenderingContext

      Satisfies Renderer interface

      Returns WebGLRenderingContext

    • Renders a scene.

      Parameters

      • scene: Scene
      • vp: Float32Array
      • camPos: Vector3D = Vector3D.ZERO
      • OptionalvMat: Float32Array<ArrayBufferLike>
      • Optionalnear: number
      • Optionalfar: number
      • OptionalprojMatrix: Float32Array<ArrayBufferLike>

      Returns void