Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    AmbientOcclusion Class

    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.

    System.Object → DisposeBase → ComponentBase → RendererCoreBase → RendererBase → DrawEffect → ImageEffect → AmbientOcclusion
    Derived from AmbientOcclusion:

    [DataContract("AmbientOcclusion")]
    public class AmbientOcclusion : ImageEffect, IComponent, IReferencable, ICollectorHolder, IImageEffect, IGraphicsRenderer, IGraphicsRendererBase, IGraphicsRendererCore, IDisposable
    Name Description
    Constructors
    AmbientOcclusion()
    Properties
    BlurScale
    EdgeSharpness
    NumberOfBounces
    NumberOfSamples
    ParamBias
    ParamIntensity
    ParamProjScale
    ParamRadius
    TempSize
    Methods
    Destroy()
    DrawCore(RenderDrawContext)
    InitializeCore()
    SetColorDepthInput(Texture, Texture)

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

    | Improve this Doc View Source

    Constructors


    AmbientOcclusion()

    public AmbientOcclusion()
    | Improve this Doc View Source

    Properties


    BlurScale

    [DataMember(74)]
    [Display("Blur radius", null)]
    public float BlurScale { get; set; }
    Property Value
    Type Description
    System.Single

    EdgeSharpness

    [DataMember(78)]
    [Display("Edge sharpness", null)]
    public float EdgeSharpness { get; set; }
    Property Value
    Type Description
    System.Single

    NumberOfBounces

    [DataMember(70)]
    [DataMemberRange(0, 3, 1, 1, 0)]
    [Display("Blur count", null)]
    public int NumberOfBounces { get; set; }
    Property Value
    Type Description
    System.Int32

    NumberOfSamples

    [DataMember(10)]
    [DataMemberRange(1, 50, 1, 5, 0)]
    [Display("Samples", null)]
    public int NumberOfSamples { get; set; }
    Property Value
    Type Description
    System.Int32

    ParamBias

    [DataMember(40)]
    [Display("Sample bias", null)]
    public float ParamBias { get; set; }
    Property Value
    Type Description
    System.Single

    ParamIntensity

    [DataMember(30)]
    [Display("Intensity", null)]
    public float ParamIntensity { get; set; }
    Property Value
    Type Description
    System.Single

    ParamProjScale

    [DataMember(20)]
    [Display("Projection scale", null)]
    public float ParamProjScale { get; set; }
    Property Value
    Type Description
    System.Single

    ParamRadius

    [DataMember(50)]
    [Display("Sample radius", null)]
    public float ParamRadius { get; set; }
    Property Value
    Type Description
    System.Single

    TempSize

    [DataMember(100)]
    [Display("Buffer size", null)]
    public AmbientOcclusion.TemporaryBufferSize TempSize { get; set; }
    Property Value
    Type Description
    AmbientOcclusion.TemporaryBufferSize
    | Improve this Doc View Source

    Methods


    Destroy()

    protected override void Destroy()
    Overrides
    RendererCoreBase.Destroy()

    DrawCore(RenderDrawContext)

    protected override void DrawCore(RenderDrawContext context)
    Parameters
    Type Name Description
    RenderDrawContext context
    Overrides
    RendererBase.DrawCore(RenderDrawContext)

    InitializeCore()

    protected override void InitializeCore()
    Overrides
    RendererCoreBase.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
    Type Name Description
    Texture colorBuffer

    A color buffer to process.

    Texture depthBuffer

    The depth buffer corresponding to the color buffer provided.


    Inherited Members

    ImageEffect.EnableSetRenderTargets
    ImageEffect.SetInput(Int32, Texture)
    ImageEffect.Reset()
    ImageEffect.SetOutput(Texture)
    ImageEffect.SetOutput(Texture[])
    ImageEffect.SetDepthOutput(Texture, Texture)
    ImageEffect.SetDepthOutput(Texture, Texture[])
    ImageEffect.SetViewport(Nullable<Viewport>)
    ImageEffect.PreDrawCore(RenderDrawContext)
    ImageEffect.SetRenderTargets(RenderDrawContext)
    ImageEffect.PostDrawCore(RenderDrawContext)
    ImageEffect.DisposeCreatedRenderTargetViews(RenderDrawContext)
    ImageEffect.InputCount
    ImageEffect.GetInput(Int32)
    ImageEffect.GetSafeInput(Int32)
    ImageEffect.DepthStencil
    ImageEffect.HasDepthStencilOutput
    ImageEffect.OutputCount
    ImageEffect.GetOutput(Int32)
    ImageEffect.GetSafeOutput(Int32)
    ImageEffect.NewScopedRenderTarget2D(TextureDescription)
    ImageEffect.NewScopedRenderTarget2D(Int32, Int32, PixelFormat, TextureFlags, Int32)
    ImageEffect.NewScopedRenderTarget2D(Int32, Int32, PixelFormat, MipMapCount, TextureFlags, Int32)
    DrawEffect.SamplingPattern
    DrawEffect.Parameters
    DrawEffect.Scaler
    DrawEffect.SetDefaultParameters()
    DrawEffect.Draw(RenderDrawContext, String)
    DrawEffect.Draw(RenderDrawContext, String, Object[])
    DrawEffect.ToString()
    RendererBase.Draw(RenderDrawContext)
    RendererCoreBase.Enabled
    RendererCoreBase.Profiling
    RendererCoreBase.ProfilingKey
    RendererCoreBase.Context
    RendererCoreBase.Services
    RendererCoreBase.Content
    RendererCoreBase.GraphicsDevice
    RendererCoreBase.EffectSystem
    RendererCoreBase.Initialized
    RendererCoreBase.Initialize(RenderContext)
    RendererCoreBase.Unload()
    RendererCoreBase.NewScopedBuffer(BufferDescription, PixelFormat)
    RendererCoreBase.NewScopedTypedBuffer(Int32, PixelFormat, Boolean, GraphicsResourceUsage)
    RendererCoreBase.PushScopedResource<T>(T)
    RendererCoreBase.CheckIsInDrawCore()
    RendererCoreBase.ToLoadAndUnload<T>(T)
    RendererCoreBase.PreDrawCoreInternal(RenderDrawContext)
    RendererCoreBase.EnsureContext(RenderContext)
    RendererCoreBase.PostDrawCoreInternal(RenderDrawContext)
    ComponentBase.Tags
    ComponentBase.Name
    ComponentBase.ICollectorHolder.Collector
    ComponentBase.OnNameChanged()
    DisposeBase.Dispose()
    DisposeBase.IsDisposed
    DisposeBase.IReferencable.ReferenceCount
    DisposeBase.IReferencable.AddReference()
    DisposeBase.IReferencable.Release()
    DisposeBase.OnAddReference()
    DisposeBase.OnReleaseReference()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    ImageEffectExtensions.SetInput(IImageEffect, Texture)
    ImageEffectExtensions.SetInput(IImageEffect, Texture, Texture)
    ImageEffectExtensions.SetInput(IImageEffect, Texture, Texture, Texture)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation