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.
 
              
              
              
              
                 Derived from AmbientOcclusion: 
              
              
              
              
              
                [DataContract("AmbientOcclusion")]
public class AmbientOcclusion : ImageEffect, IComponent, IReferencable, ICollectorHolder, IImageEffect, IGraphicsRenderer, IGraphicsRendererBase, IGraphicsRendererCore, IDisposable
               
              
              
              
              
              
                  
              
                     
              
                
                  |
                  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
              
                     
              
                
                  |
                  Improve this Doc
                
                
                  View Source
                
              
              
                Methods
              
                
              
              
              
              
              
              Destroy()
              
              
              
              
              
                protected override void Destroy()
               
              
              Overrides
              
              
              
              
              
              
              DrawCore(RenderDrawContext)
              
              
              
              
              
                protected override void DrawCore(RenderDrawContext context)
               
              
              Parameters
              
              Overrides
              
              
              
              
              
              
              InitializeCore()
              
              
              
              
              
                protected override void InitializeCore()
               
              
              Overrides
              
              
              
              
              
              
              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. 
 | 
                  
                
              
              
              
 
              
               
              
              
              
              
              
              
              Extension Methods