Skybox

fun FilamentSceneScope.Skybox(color: LinearColor, alpha: Float = 1.0f, showSun: Boolean = false, intensity: Float = 1.0f, priority: Int = 0)

A solid-color background for the scene. The color is set on the live skybox, so animating it is cheap.

rememberFilamentScene {
Skybox(color = LinearColor(0.05f, 0.05f, 0.08f))
}

A scene has one skybox: declare one Skybox (or one Environment) per scene.

Parameters

color

Linear background color.

alpha

Background alpha; below 1 only shows through a transparent view.

showSun

Draw the sun disk of the scene's SunLight.

intensity

Skybox intensity, used only while the scene has no IndirectLight.

priority

Draw-order priority of the skybox.


fun FilamentSceneScope.Skybox(texture: Texture?, showSun: Boolean = false, intensity: Float = 1.0f, priority: Int = 0)

A cubemap background for the scene, e.g. the Environment.skybox of a loaded environment or a cubemap of your own. Renders nothing while texture is null (still loading).

Parameters

texture

The cubemap to draw, or null while it loads.

showSun

Draw the sun disk of the scene's SunLight.

intensity

Skybox intensity, used only while the scene has no IndirectLight.

priority

Draw-order priority of the skybox.