Class AmbientOcclusion
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
EdgeSharpness
[DataMember(78)]
[Display("Edge sharpness", null)]
public float EdgeSharpness { get; set; }
Property Value
NumberOfBounces
[DataMember(70)]
[DataMemberRange(0, 3, 1, 1, 0)]
[Display("Blur count", null)]
public int NumberOfBounces { get; set; }
Property Value
NumberOfSamples
[DataMember(10)]
[DataMemberRange(1, 50, 1, 5, 0)]
[Display("Samples", null)]
public int NumberOfSamples { get; set; }
Property Value
ParamBias
[DataMember(40)]
[Display("Sample bias", null)]
public float ParamBias { get; set; }
Property Value
ParamIntensity
[DataMember(30)]
[Display("Intensity", null)]
public float ParamIntensity { get; set; }
Property Value
ParamProjScale
[DataMember(20)]
[Display("Projection scale", null)]
public float ParamProjScale { get; set; }
Property Value
ParamRadius
[DataMember(50)]
[Display("Sample radius", null)]
public float ParamRadius { get; set; }
Property Value
TempSize
[DataMember(100)]
[Display("Buffer size", null)]
public AmbientOcclusion.TemporaryBufferSize TempSize { get; set; }
Property Value
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
RenderDrawContextThe 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)