# Class SSAOApplier

SSAOApplier is the class that modulates the screen buffer with the calculated SSAO (which means that even directly lit areas are modulated, which is not correct but looks kind of nice anyways) The variable called blittedscreen is a postprocess that just writes the current scene to a texture buffer

#### Hierarchy (View Summary)

- TwinfinityPostProcess
  - SSAOApplier

##### Index

### Constructors

constructor

### Properties

_postProcess

### Accessors

affectedCameras

### Methods

attach
detach
initialize

## Constructors

### constructor

- new SSAOApplier(blitedScreen: PostProcess, renderScale: number): SSAOApplier

  #### Parameters

  - blitedScreen: PostProcess
  - renderScale: number

  #### Returns SSAOApplier

  Overrides TwinfinityPostProcess.constructor

## Properties

### `Protected`_postProcess

_postProcess: undefined | PostProcess = undefined

Inherited from TwinfinityPostProcess._postProcess

## Accessors

### affectedCameras

- get affectedCameras(): Set<Camera>

  Returns a set of all the cameras this post-process effect is attached to.

  #### Returns Set<Camera>

  Inherited from TwinfinityPostProcess.affectedCameras

## Methods

### attach

- attach(camera: Camera): boolean

  Runs the initialize method if the post-process has not yet been initialized. Then attaches the post-process effect to the specified camera.

  #### Parameters

  - camera: Camera

    The camera to attach the post-process effect to.

  #### Returns boolean

  true if the post-process effect was successfully attached to the camera, otherwise false.

  Inherited from TwinfinityPostProcess.attach

### detach

- detach(camera: Camera): boolean

  Disables the post-process effect for the specified camera.

  #### Parameters

  - camera: Camera

    The camera to detach the post-process effect from.

  #### Returns boolean

  true if the post-process effect was successfully detached from the camera, otherwise false.

  Inherited from TwinfinityPostProcess.detach

### `Protected` initialize

- initialize(camera: Camera): PostProcess

  Method for initializing this post-process effect before it gets attached to a camera. This gets called automatically from attach.

  #### Parameters

  - camera: Camera

    BabylonJS camera variable.

  #### Returns PostProcess

  Overrides TwinfinityPostProcess.initialize