Skip to main content

Editor.Components.CameraOitLayers

Enum

The same entity as in Lens Scripting.

Index

Example

const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
const camera = model.project.scene.mainCamera;

// Enable 4-layer order-independent transparency.
// OIT is expensive (per-pixel sorting) — only turn it on when you have
// overlapping translucent geometry whose draw order can't be sorted on
// the CPU (particles, smoke, stacked glass). For most lenses the default
// is the right choice. See:
// https://developers.snap.com/lens-studio/features/graphics/advanced/order-independent-transparency
camera.oitLayers = Editor.Components.CameraOitLayers.Layers4;
console.log(`oitLayers: ${camera.oitLayers}`);

Enumeration Members

Layers4

Layers4: number

OIT with 4 transparency layers.


Layers4Plus1

Layers4Plus1: number

OIT with 4 layers plus one additional layer.


Layers8

Layers8: number

OIT with 8 transparency layers.


NoOit

NoOit: number

Order-independent transparency disabled.

See also

Editor.Components.Camera.