Table of Contents

Class AmbientOcclusion

Namespace
Stride.Rendering.Images
Assembly
Stride.Rendering.dll

Applies an ambient occlusion effect to a scene. Ambient occlusion is a technique which fakes occlusion for objects close to other opaque objects. It takes as input a color-buffer where the scene was rendered, with its associated depth-buffer. You also need to provide the camera configuration you used when rendering the scene.

[DataContract("AmbientOcclusion")]
public class AmbientOcclusion : ImageEffect, IComponent, IReferencable, ICollectorHolder, IImageEffect, IGraphicsRenderer, IGraphicsRendererBase, IGraphicsRendererCore, IDisposable
Inheritance
AmbientOcclusion
Implements
Inherited Members
Extension Methods

Constructors

AmbientOcclusion()

public AmbientOcclusion()

Properties

BlurScale

[DataMember(74)]
[Display("Blur radius", null)]
public float BlurScale { get; set; }

Property Value

float

EdgeSharpness

[DataMember(78)]
[Display("Edge sharpness", null)]
public float EdgeSharpness { get; set; }

Property Value

float

NumberOfBounces

[DataMember(70)]
[DataMemberRange(0, 3, 1, 1, 0)]
[Display("Blur count", null)]
public int NumberOfBounces { get; set; }

Property Value

int

NumberOfSamples

[DataMember(10)]
[DataMemberRange(1, 50, 1, 5, 0)]
[Display("Samples", null)]
public int NumberOfSamples { get; set; }

Property Value

int

ParamBias

[DataMember(40)]
[Display("Sample bias", null)]
public float ParamBias { get; set; }

Property Value

float

ParamIntensity

[DataMember(30)]
[Display("Intensity", null)]
public float ParamIntensity { get; set; }

Property Value

float

ParamProjScale

[DataMember(20)]
[Display("Projection scale", null)]
public float ParamProjScale { get; set; }

Property Value

float

ParamRadius

[DataMember(50)]
[Display("Sample radius", null)]
public float ParamRadius { get; set; }

Property Value

float

TempSize

[DataMember(100)]
[Display("Buffer size", null)]
public AmbientOcclusion.TemporaryBufferSize TempSize { get; set; }

Property Value

AmbientOcclusion.TemporaryBufferSize

Methods

Destroy()

Disposes of object resources.

protected override void Destroy()

DrawCore(RenderDrawContext)

Main drawing method for this renderer that must be implemented.

protected override void DrawCore(RenderDrawContext context)

Parameters

context RenderDrawContext

The context.

InitializeCore()

protected override void InitializeCore()

SetColorDepthInput(Texture, Texture)

Provides a color buffer and a depth buffer to apply the depth-of-field to.

public void SetColorDepthInput(Texture colorBuffer, Texture depthBuffer)

Parameters

colorBuffer Texture

A color buffer to process.

depthBuffer Texture

The depth buffer corresponding to the color buffer provided.