.. _stdlib_ssao_settings_component: ============ SSAOSettings ============ ++++++++++++ Enumerations ++++++++++++ .. _enum-public_components-SSAOMethod: .. das:attribute:: SSAOMethod :Values: * **SSAO** = 0 - Simple SSAO implementation computed as average cosine between surface normal and samples directions. It's cheaper than GTAO, but is not physically plausible. * **GTAO** = 1 - Ground Truth Ambient Occlusion implementation. Produces results close to raytraced AO depending on how much information about surroundings we can get from the depth buffer. .. _enum-public_components-SSAOMode: .. das:attribute:: SSAOMode :Values: * **Immediate** = 0 - SSAO will be recomputed every frame ignoring history. To have appealing results, more samples have to be taken per frame. * **Temporal** = 1 - SSAO results will be accumulated across frames. This way we can sample less per frame thus increasing performance, but get ghosting effects (mosly noticeable on moving objects). +++++++ Classes +++++++ .. _struct-ssao_settings_component-SSAOSettings: .. das:attribute:: SSAOSettings : NativeComponent This component is used to setup SSAO (screen space ambient occlusion) effect. SSAO adds sense of depth to the scene by shadowing corners, where less ambient light can reach to. The amount of shadowing is computed by tracing screen space depth buffer in a local area of a pixel. There is a lot of information about SSAO available in the internet and in other sources, so you can refer to there for more details. To use this component, add the following line to your project file:: require engine.core_components.ssao_settings_component // or require engine.core Usage example:: let setting = create_render_settings() get_component(renderSettings) $(var ssao : SSAOSettings?) { ssao.active = true ssao.method = SSAOMethod.GTAO ssao.worldRadius = 1.0 ssao.screenRadius = 4.0 ssao.strength = 0.7 } :Properties: .. _function-ssao_settings_component__dot__rq_active_SSAOSettings: .. das:operator:: SSAOSettings.active() : bool .. _function-ssao_settings_component__dot__rq_active_rq_clone_SSAOSettings_bool: .. das:operator:: SSAOSettings.active =(value: bool) Active flag. If set to true, SSAO will be applied to the result image. Default is false. :Arguments: * **value** : bool .. _function-ssao_settings_component__dot__rq_mode_SSAOSettings: .. das:operator:: SSAOSettings.mode() : SSAOMode .. _function-ssao_settings_component__dot__rq_mode_rq_clone_SSAOSettings_SSAOMode: .. das:operator:: SSAOSettings.mode =(value: SSAOMode) The way samples are accumulated over frames. Affects only SSAOMethod SSAO. GTAO is always temporal. See SSAOMode enum description for details. :Arguments: * **value** : :ref:`SSAOMode ` .. _function-ssao_settings_component__dot__rq_method_SSAOSettings: .. das:operator:: SSAOSettings.method() : SSAOMethod .. _function-ssao_settings_component__dot__rq_method_rq_clone_SSAOSettings_SSAOMethod: .. das:operator:: SSAOSettings.method =(value: SSAOMethod) Base method used for computing ambient occlusion. See SSAOMethod enum description for details. :Arguments: * **value** : :ref:`SSAOMethod ` .. _function-ssao_settings_component__dot__rq_strength_SSAOSettings: .. das:operator:: SSAOSettings.strength() : float .. _function-ssao_settings_component__dot__rq_strength_rq_clone_SSAOSettings_float: .. das:operator:: SSAOSettings.strength =(value: float) The strength of the effect. Applied as an exponent to the computed AO value. :Arguments: * **value** : float .. _function-ssao_settings_component__dot__rq_worldRadius_SSAOSettings: .. das:operator:: SSAOSettings.worldRadius() : float .. _function-ssao_settings_component__dot__rq_worldRadius_rq_clone_SSAOSettings_float: .. das:operator:: SSAOSettings.worldRadius =(value: float) Minimum world-space-constant radius of the effect. The final world space radius is the maximum between world-space-contant and screen-space-constant radiuses computed at a certain depth. :Arguments: * **value** : float .. _function-ssao_settings_component__dot__rq_screenRadius_SSAOSettings: .. das:operator:: SSAOSettings.screenRadius() : float .. _function-ssao_settings_component__dot__rq_screenRadius_rq_clone_SSAOSettings_float: .. das:operator:: SSAOSettings.screenRadius =(value: float) Minimum screen-space-constant radius of the effect. Set up as a percentage of the viewport height. The final world space radius is the maximum between world-space-contant and screen-space-constant radiuses computed at a certain depth. :Arguments: * **value** : float .. _function-ssao_settings_component__dot__rq_cutoffRadiusExtent_SSAOSettings: .. das:operator:: SSAOSettings.cutoffRadiusExtent() : float .. _function-ssao_settings_component__dot__rq_cutoffRadiusExtent_rq_clone_SSAOSettings_float: .. das:operator:: SSAOSettings.cutoffRadiusExtent =(value: float) Multiplier to the final AO radius at which the effect is to be cut off. This is to avoid darkening of too far objects by close objects. :Arguments: * **value** : float .. _function-ssao_settings_component__dot__rq_cutoffSmoothness_SSAOSettings: .. das:operator:: SSAOSettings.cutoffSmoothness() : float .. _function-ssao_settings_component__dot__rq_cutoffSmoothness_rq_clone_SSAOSettings_float: .. das:operator:: SSAOSettings.cutoffSmoothness =(value: float) Smoothness of the cutoff in range [0, 1]. :Arguments: * **value** : float