Sky

Classes

Sky : NativeComponent

This component is used to setup skybox. By default it is some procedural skybox(if render settings created). But can be overriden by custom material. Sky color can influence on scene lighting by ambient light and sky specular light. See set_panorama and set_skybox functions.

To use this component, add the following line to your project file:

require engine.core_components.sky_component // or require engine.core

Usage example:

let setting = create_render_settings()
// equals to set_skybox(renderSettings, texture)
get_component(renderSettings) $(var sky : Sky?) {
    sky.active = true
    sky.materialId = create_material(MaterialImport(
        shaderName = "sky_box",
        diffuse = texture
    ))
}
Properties:

Sky.active: bool
Sky.active =(value: bool)

Active flag. If set to true, render sky with given material. Default is true.

Arguments:
  • value : bool

Sky.isHdr: bool
Sky.isHdr =(value: bool)

Whether to use HDR format (RGBA16F) for the sky cubemap. Affects reflections and ambient lighting coming from the sky.

Arguments:
  • value : bool

Sky.materialId: MaterialId
Sky.materialId =(value: MaterialId)

Material of sky. Default is material from ‘sky_box_procedural’ shader.

Arguments: