BBMOD_Cubemap

Extends BBMOD_Class
Implements Struct.BBMOD_IRenderTarget

constructor

new BBMOD_Cubemap(_resolution)

Description

A cubemap.

Arguments

Name Type Description
_resolution Real A resolution of single cubemap side. Must be power of 2!

Properties

Name Description
Position The position of the cubemap in the world space.
Resolution A resolution of single cubemap side. Must be power of two.
Sides An array of surfaces.
Surface A single surface containing all cubemap sides. This can be passed as uniform to a shader for cubemapping.
ZFar Distance to the far clipping plane used in the cubemap's projection matrix. Defaults to 8192.
ZNear Distance to the near clipping plane used in the cubemap's projection matrix. Defaults to 0.1.

Methods

Name Description
get_projection_matrix Creates a projection matrix for the cubemap.
get_surface Gets a surface for given cubemap side. If the surface is corrupted, then a new one is created.
get_view_matrix Creates a view matrix for given cubemap side.
set_target Sets next cubemap side surface as the render target and sets the current view and projection matrices appropriately.
to_single_surface Puts all faces of the cubemap into a single surface.
Do you find this page helpful?

Copyright © 2022, BlueBurn. Built on November 16, 2022 using GMDoc.