Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ForwardSceneRenderPass

This class renders a SceneNode hierarchy. It uses one single program for rendering the whole scene. If different programs are necessary to render a scene, multiple SceneNodes should be used for each program that is used. This renderpass calls callbacks such as updateModelTransform, which have to be set by the renderer using this renderpass.

Hierarchy

Index

Constructors

constructor

Properties

Protected Readonly _altered

_altered: ChangeLookup & { any: boolean; camera: boolean } = ...

Alterable auxiliary object for tracking changes on render pass inputs and lazy updates.

Protected _camera

_camera: Camera
see

camera

Protected _clearColor

_clearColor: GLclampf4

Protected _context

_context: Context

Context, used to get context information and WebGL API access.

Protected _ndcOffset

_ndcOffset: GLfloat2
see

ndcOffset

Protected _opaqueGeometryMap

_opaqueGeometryMap: Map<Material, [Geometry, mat4][]>

These maps are used to map from a material to all geometries using this material. Alongside the geometry a transform is saved, that is generated during a preprocessing traverse.

Protected _program

_program: Program
see

program

Protected _scene

_scene: undefined | SceneNode
see

scene

Protected _target

_target: Framebuffer
see

target

Protected _transparentGeometryMap

_transparentGeometryMap: Map<Material, [Geometry, mat4][]>

Protected assertInitialized

assertInitialized: () => void = ...

Asserts the objects initialization status to be true. Note that the implementation is cached and forwarded to either an empty function when initialized and to an acutal assert(false) otherwise.

Type declaration

    • (): void
    • Returns void

Protected assertUninitialized

assertUninitialized: () => void = ...

Asserts the objects initialization status to be false. Note that the implementation is cached and forwarded to either an empty function when uninitialized and to an acutal assert(false) otherwise.

Type declaration

    • (): void
    • Returns void

bindGeometry

bindGeometry: (geometry: Geometry) => void

Type declaration

bindMaterial

bindMaterial: (material: Material) => void

Type declaration

bindUniforms

bindUniforms: () => void

Type declaration

    • (): void
    • Returns void

updateModelTransform

updateModelTransform: (matrix: mat4) => void

Type declaration

    • (matrix: mat4): void
    • Parameters

      Returns void

updateViewProjectionTransform

updateViewProjectionTransform: (matrix: mat4) => void

Type declaration

    • (matrix: mat4): void
    • Parameters

      Returns void

Accessors

camera

  • set camera(camera: Camera): void

clearColor

initialized

  • get initialized(): boolean
  • Property getter for readonly access to the initialization status of an initializable instance.

    Returns boolean

ndcOffset

  • The NDC offset is used for vertex displacement within subpixel space for anti-aliasing over multiple intermediate frames (multi-frame sampling).

    Parameters

    • offset: GLfloat2

      Subpixel offset used for vertex displacement (multi-frame anti-aliasing).

    Returns void

program

  • set program(program: Program): void

scene

target

Methods

drawCalls

  • drawCalls(renderTransparentMaterials?: boolean): void
  • Encapsulates the draw calls made to webgl. This is useful if state should not be changed before rendering, e.g. for shadow mapping.

    Parameters

    • renderTransparentMaterials: boolean = true

    Returns void

frame

  • frame(): void

initialize

  • initialize(): boolean

prepare

  • prepare(): void

Protected preprocessNode

  • Handle a single node during preprocessing. Each GeometryComponent of the node will be added to the preprocessing maps. Afterwards all children of the node will also be processed recursively.

    Parameters

    Returns void

Protected preprocessScene

  • preprocessScene(): void

Protected renderGeometryMap

uninitialize

  • uninitialize(): void

update

  • update(override?: boolean): void

Static Protected Readonly assertInitializedFalse

Static Protected Readonly assertUninitializedFalse

Static assert_initialized

  • assert_initialized(): MethodDecorator

Static assert_uninitialized

  • assert_uninitialized(): MethodDecorator

Static discard

  • discard(): MethodDecorator
  • Method decorator for discarding of Initializable inheritors. This decorator asserts the initialization status of the instance that is to be discarded, invokes its uninitialization, and falsifies the initialization status. In order to encourage the use of assertInitialized and assertUninitialized they are dynamically bound to a static, always-failing assert and an empty/undefined function respectively.

    Returns MethodDecorator

Static initialize

  • initialize(): MethodDecorator
  • Method decorator for initialization of Initializable inheritors. This decorator asserts the initialization status of the instance that is to be initialized, invokes its initialization with arbitrary number of parameters, and sets the initialization status to the initialization success (either false or true). In order to encourage the use of assertInitialized and assertUninitialized they are dynamically bound to either a static, always-failing assert or an empty/undefined function.

    Returns MethodDecorator

Static uninitialize

  • uninitialize(): MethodDecorator
  • Method decorator for uninitialization of Initializable inheritors. This decorator asserts the initialization status of the instance that is to be uninitialized, invokes its uninitialization, and falsifies the initialization status. In order to encourage the use of assertInitialized and assertUninitialized they are dynamically bound to a static, always-failing assert and an empty/undefined function respectively.

    Returns MethodDecorator