Skybox

class Skybox(nativeHandle: NativePointer)

Skybox renders a background environment cube around the camera.

When added to a Scene, the Skybox fills all untouched pixels. The Skybox is rendered as though the camera is inside an infinitely large cube with the cubemap mapped to its exterior. This allows rendering a background environment that follows the camera's orientation.

Creation and destruction: Create a Skybox with the Builder and destroy with Engine.destroy(skybox).

val skybox = Skybox.Builder()
.environment(cubemap)
.build(engine)
// later:
engine.destroy(skybox)

Note: The Skybox and IndirectLight both render backgrounds. Currently, only Texture-based skyboxes are supported. The Skybox typically uses lower-resolution cubemaps for visual appearance, while IndirectLight provides the high-quality irradiance for lighting calculations.

See also

Scene.setSkybox

Constructors

Link copied to clipboard
constructor(nativeHandle: NativePointer)

Types

Link copied to clipboard
class Builder

Builder for creating Skybox instances.

Properties

Link copied to clipboard

Returns the Skybox's intensity in lux, or lumen/m².

Link copied to clipboard

Returns the visibility mask bits (layer mask).

Link copied to clipboard

The native object, for interop with code calling the Fila* C API directly. Read-only: this wrapper owns it.

Link copied to clipboard

Returns the associated environment cubemap Texture.

Functions

Link copied to clipboard
fun setColor(r: Float, g: Float, b: Float, a: Float)

Dynamically update the Skybox's constant color.

Link copied to clipboard
fun setLayerMask(select: Int, value: Int)

Set bits in the visibility mask.