Package-level declarations

Types

Link copied to clipboard
class Aabb(var min: FloatArray = FloatArray(3) { Float.MAX_VALUE }, var max: FloatArray = FloatArray(3) { -Float.MAX_VALUE })

An axis-aligned box represented by its min and max coordinates.

Link copied to clipboard

Options for screen space Ambient Occlusion (SSAO) and Screen Space Cone Tracing (SSCT).

Link copied to clipboard

Anti-aliasing technique.

Link copied to clipboard

How an asynchronous call ended; its completion callback runs exactly once either way.

Link copied to clipboard

Blending mode for the view.

Link copied to clipboard

Options to control the bloom post-processing effect.

Link copied to clipboard
class Box(var center: FloatArray = FloatArray(3), var halfExtent: FloatArray = FloatArray(3))

An axis-aligned 3D box represented by its center and half-extent.

Link copied to clipboard
class BufferObject(nativeHandle: NativePointer)

A generic GPU buffer for storing data.

Link copied to clipboard
class Camera(nativeHandle: NativePointer, val entity: Entity)

Camera represents the eye(s) through which the scene is viewed.

Link copied to clipboard
object Color

Utilities to manipulate and convert colors. RGB colors are 3 floats, RGBA colors 4; results are new arrays. sRGB conversions are the accurate ones (C++'s default ColorConversion::ACCURATE).

Link copied to clipboard
class ColorGrading(nativeHandle: NativePointer)

ColorGrading is used to transform (modify or correct) the colors of the HDR buffer.

Link copied to clipboard
class ColorSpace(val primaries: Primaries, val transferFunction: TransferFunction, val whitePoint: FloatArray)

An RGB color space: the primaries that define its gamut, a whitePoint (float2) its values are normalized to, and the transferFunction between linear and encoded values. Also written gamut - transferFunction - whitePoint, e.g. Gamut.Rec709 - TransferFunction.sRGB - WhitePoint.D65.

Link copied to clipboard

Options to control Depth of Field (DoF) effect in the scene.

Link copied to clipboard

Dithering mode for temporal coherence in rendering.

Link copied to clipboard

Dynamic resolution options control rendering resolution scaling to meet target frame rates.

Link copied to clipboard

Engine is Filament's main entry-point.

Link copied to clipboard
typealias Entity = Int

An Entity is an opaque 32-bit identifier for objects in the scene.

Link copied to clipboard
typealias EntityInstance = Int

An EntityInstance is an opaque 32-bit identifier representing a component instance.

Link copied to clipboard
class EntityManager(nativeHandle: NativePointer)

Manages entity creation, destruction, and lifecycle.

Link copied to clipboard
object Exposure

Utilities to compute exposure, exposure value at ISO 100 (EV100), luminance and illuminance using a physically-based camera model. Aperture is in f-stops, shutter speed in seconds, sensitivity in ISO.

Link copied to clipboard
class Fence(nativeHandle: NativePointer, engine: NativePointer = NullPointer)

Fence is used to synchronize the application main thread with filament's rendering thread.

Link copied to clipboard
actual object Filament

Filament is the main module initialization singleton.

expect object Filament

Filament is the main module initialization singleton.

actual object Filament

Filament is the main module initialization singleton.

actual object Filament

Filament is the main module initialization singleton.

actual object Filament

Filament is the main module initialization singleton.

Link copied to clipboard

Platform buckets used by PlatformGap. WEB covers both the js and wasmJs targets (they share the same webMain actuals and the same filament-kmp.wasm module).

Link copied to clipboard

Options to control large-scale fog in the scene.

Link copied to clipboard

Yields the frames renderer presented since the last getNewFrames, tracking the last processed frame ID and reporting the IDs of frames that went missing. Keep one alive across frames and close it when done.

Link copied to clipboard
class FramePacer(nativeHandle: NativePointer)

Coordinates frame scheduling and presentation timestamps: a filter between the platform's VSYNC callbacks (such as Android's Choreographer) and Renderer.setPresentationTime.

Link copied to clipboard

Estimates the ideal frame rate (throughput) and latency (pipeline depth) from Renderer.getFrameInfoHistory, modelling the main CPU, backend and GPU stages by their mean plus Z standard deviations:

Link copied to clipboard
class Gamut(val primaries: Primaries)

A color gamut, defined by its primaries.

Link copied to clipboard

Options for the screen-space guard band.

Link copied to clipboard
class IndexBuffer(nativeHandle: NativePointer)

A buffer containing vertex indices into a VertexBuffer.

Link copied to clipboard
class IndirectLight(nativeHandle: NativePointer)

IndirectLight simulates environment lighting, a form of global illumination.

Link copied to clipboard
class InstanceBuffer(nativeHandle: NativePointer)

Per-instance local transforms for a renderable drawn with RenderableManager.Builder.instances. Each transform is relative to the renderable's, so moving the renderable moves all its instances. Transforms are column-major mat4fs, 16 floats each. Destroy it with Engine.destroy, after the renderables that use it.

Link copied to clipboard
@RequiresOptIn(level = RequiresOptIn.Level.ERROR, message = "Raw native handle: an implementation detail of filament-kmp, not supported API.")
annotation class InternalFilamentApi

Marks a raw native handle that filament-kmp's own modules share across module boundaries.

Link copied to clipboard
class LightManager(nativeHandle: NativePointer)

LightManager allows you to create light sources in the scene.

Link copied to clipboard
class Material(nativeHandle: NativePointer)

Material defines the visual appearance of a surface.

Link copied to clipboard

The domain a material's shaders apply to.

Link copied to clipboard
class MaterialInstance(nativeHandle: NativePointer)

MaterialInstance customizes the parameters of a Material for per-object rendering.

Link copied to clipboard
class MorphTargetBuffer(nativeHandle: NativePointer)

A container for vertex morphing data that supports both automatic and manual morphing.

Link copied to clipboard

Options for Multi-Sample Anti-aliasing (MSAA).

Link copied to clipboard
actual class NativeSurface

Android implementation of NativeSurface: surface must be an android.view.Surface.

expect class NativeSurface

A platform-agnostic representation of a display surface.

actual class NativeSurface

JVM implementation of NativeSurface: a raw native window/layer pointer (HWND, X11 Window, NSView*, CAMetalLayer*) as a Long or Int address, handed to FilaEngine_createSwapChain as a void*.

actual class NativeSurface

Native implementation of NativeSurface, wrapping a raw pointer.

actual class NativeSurface

On web a swap chain renders to its engine's WebGL canvas; canvas names which one.

Link copied to clipboard

A color space missing its white point: gamut - transferFunction.

Link copied to clipboard

Marks a common API whose platform binding is missing or degraded on the listed platforms.

Link copied to clipboard
class Primaries(val r: FloatArray, val g: FloatArray, val b: FloatArray)

The xy chromaticities (in xyY, Y = 1) of a color space's red, green and blue primaries; each a float2.

Link copied to clipboard

Generic quality level for various rendering options.

Link copied to clipboard

Reflection rendering mode.

Link copied to clipboard

Refraction rendering mode.

Link copied to clipboard

Type of refracted surface.

Link copied to clipboard
class RenderableManager(nativeHandle: NativePointer)

Factory and manager for Renderables, which are entities that can be drawn.

Link copied to clipboard
class Renderer(nativeHandle: NativePointer)

Renderer represents an operating system window and manages frame rendering and pacing.

Link copied to clipboard

Options to control color buffer precision and quality settings.

Link copied to clipboard
class RenderTarget(nativeHandle: NativePointer, textures: Array<Texture?>)

An offscreen render target that can be associated with a View and contains weak references to a set of attached Texture objects.

Link copied to clipboard

Types of RGBA colors.

Link copied to clipboard

Types of RGB colors.

Link copied to clipboard
class Scene(nativeHandle: NativePointer)

A Scene is a collection of Renderables and Lights to be rendered together.

Link copied to clipboard

Options for Screen-space Reflections (SSR).

Link copied to clipboard

Shadow rendering technique.

Link copied to clipboard
class SkinningBuffer(nativeHandle: NativePointer)

SkinningBuffer is used to hold skinning data (bones) for skeletal animation.

Link copied to clipboard
class Skybox(nativeHandle: NativePointer)

Skybox renders a background environment cube around the camera.

Link copied to clipboard

View-level options for DPCF and PCSS (soft) shadowing.

Link copied to clipboard

Options for stereoscopic (multi-eye) rendering.

Link copied to clipboard
@PlatformGap(platforms = [FilamentPlatform.WEB], behavior = "setDimensions throws — FStream waits on a fence internally, which single-threaded wasm rejects; external video streams have no WebGL source anyway.")
class Stream(nativeHandle: NativePointer)

Stream is used to attach a video stream to a Filament Texture.

Link copied to clipboard

The surface orientation helper can be used to populate Filament-style TANGENTS buffers.

Link copied to clipboard
class SwapChain(nativeHandle: NativePointer, window: NativePointer = NullPointer)

A SwapChain represents an Operating System's native renderable surface.

Link copied to clipboard

Options for Temporal Anti-aliasing (TAA).

Link copied to clipboard
class Texture(nativeHandle: NativePointer)

Texture represents a GPU texture resource.

Link copied to clipboard

TextureSampler defines how a texture is accessed during rendering.

Link copied to clipboard
open class ToneMapper(nativeHandle: NativePointer) : AutoCloseable

Interface for tone mapping operators.

Link copied to clipboard
data class TransferFunction(val a: Double, val b: Double, val c: Double, val d: Double, val e: Double, val f: Double, val g: Double)

An ICC parametric curve type 4 (ICC.1:2004-10, 10.15): the EOTF is Y = cX + f for X < d and Y = (aX + b)^g + e otherwise; the OETF is its inverse. The 5-parameter constructor (e = f = 0) is curve type 3.

Link copied to clipboard
class TransformManager(nativeHandle: NativePointer)

TransformManager allows managing transforms (4x4 matrices) for entities.

Link copied to clipboard

Variant filter bits, combined into a mask (UserVariantFilterMask in C++) for Material.compile and MaterialInstance.compile.

Link copied to clipboard
class VertexBuffer(nativeHandle: NativePointer)

Holds a set of buffers that define the geometry of a Renderable.

Link copied to clipboard
class View(nativeHandle: NativePointer)

A View encompasses all the state needed for rendering a Scene.

Link copied to clipboard
data class Viewport(var left: Int = 0, var bottom: Int = 0, var width: Int = 0, var height: Int = 0)

Viewport specifies the rectangular region where a View's Scene is rendered.

Link copied to clipboard

Options to control the vignetting effect (darkening at screen edges).

Link copied to clipboard

View-level options for VSM (Variance Shadow Maps) shadowing.

Link copied to clipboard
object WhitePoint

Reference white points: xy chromaticities in xyY, each a new float2.

Properties

Link copied to clipboard

The canvas this engine renders into.

Link copied to clipboard
const val NULL_ENTITY: Entity = 0

A special Entity value representing no entity (null).

Functions

Link copied to clipboard
fun aabb(fill: (NativePointer) -> Unit): Aabb

The Aabb fill writes into a native one (for other modules' functions returning an Aabb).

Link copied to clipboard

The bounding box of box transformed by the rigid transform m (mat4f).

Link copied to clipboard

Convert a FloatArray to a ByteArray in native byte order.

Convert an IntArray to a ByteArray in native byte order.

Convert a ShortArray to a ByteArray in native byte order.