Skip to content

Effect Descriptor

EffectDesc is a descriptor type for applying post-processing effects to the rendering pipeline. You can add various visual effects such as anti-aliasing, depth of field, tone mapping, and more.

The following EffectDescriptor types are available in navara_three:

Descriptor TypeDescription
AerialPerspectiveEffectDescAn effect that simulates light scattering and transmittance through the atmosphere
CloudsEffectDescAn effect that renders real-time volumetric clouds
ColorGradingLUTEffectDescAn effect that applies color grading using a LUT
DepthOfFieldEffectDescAn effect that applies bokeh based on the camera’s focal plane
FogLightEffectDescAn effect that generates volumetric fog from point lights
FXAAEffectDescAn effect that applies FXAA (Fast Approximate Anti-Aliasing)
LensFlareEffectDescAn effect that generates lens flares from the sun and moon
RainDropEffectDescAn effect that applies raindrop refraction to the screen
SelectiveBloomEffectDescAn effect that applies selective bloom
SelectiveOutlineEffectDescAn effect that applies selective outlines
SMAAEffectDescAn effect that applies SMAA (Subpixel Morphological Anti-Aliasing)
SSAOEffectDescAn effect that applies screen-space ambient occlusion
SSREffectDescAn effect that generates real-time screen-space reflections
ToneMappingEffectDescAn effect that performs HDR to LDR color adjustment

Effect Descriptors are added by registering the descriptor class and then calling the view.addEffect() method:

import ThreeView from "@navaramap/three";
import { AerialPerspectiveEffectDesc } from "@navaramap/three_default_descs";
const view = new ThreeView();
// Register the descriptor class
view.registerEffect("aerialPerspective", AerialPerspectiveEffectDesc);
await view.init();
const aerialPerspectiveDesc = view.addEffect<AerialPerspectiveEffectDesc>({
aerialPerspective: {},
});

All Effect Descriptors have the following basic settings:

  • id: A unique identifier for the object
  • visible: Toggles the object’s visibility

Refer to each descriptor type’s documentation for detailed usage.