PostProcessing

data class PostProcessing(val enabled: Boolean = true, val bloom: Bloom? = null, val vignette: Vignette? = null, val fog: Fog? = null, val ambientOcclusion: AmbientOcclusion? = null, val antiAliasing: AntiAliasing? = null, val screenSpaceReflections: ScreenSpaceReflections? = null, val colorGrade: ColorGrade? = null, val depthOfField: DepthOfField? = null, val shadows: Shadows? = null, val dynamicResolution: DynamicResolution? = null, val dithering: Dithering? = null, val renderQuality: RenderQuality? = null)

Per-view visual configuration: post-processing effects plus render-quality options. Pass to io.github.erkko68.filament.compose.FilamentView via postProcessing = ....

Each effect is a singleton value class — there is exactly one of each per Filament view, so a null field means "leave Filament's native default / effect off", and a non-null field enables and configures that effect. Animate an effect by passing a new value each frame: PostProcessing(bloom = Bloom(strength = animated)).

FilamentView(
scene = scene,
cameraState = cam,
postProcessing = PostProcessing(
bloom = Bloom(strength = 0.2f),
antiAliasing = AntiAliasing(fxaaEnabled = true),
shadows = Shadows(type = View.ShadowType.PCF),
),
)

Parameters

enabled

Master switch for all post-processing (maps to View.isPostProcessingEnabled).

Constructors

Link copied to clipboard
constructor(enabled: Boolean = true, bloom: Bloom? = null, vignette: Vignette? = null, fog: Fog? = null, ambientOcclusion: AmbientOcclusion? = null, antiAliasing: AntiAliasing? = null, screenSpaceReflections: ScreenSpaceReflections? = null, colorGrade: ColorGrade? = null, depthOfField: DepthOfField? = null, shadows: Shadows? = null, dynamicResolution: DynamicResolution? = null, dithering: Dithering? = null, renderQuality: RenderQuality? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val bloom: Bloom?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val fog: Fog?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard