Fog Class
Namespace: Stride.Rendering.ImagesAssembly: Stride.Rendering.dll
A fog filter.
System.Object → DisposeBase → ComponentBase → RendererCoreBase → RendererBase → DrawEffect → ImageEffect →
Fog
Derived from Fog:
[DataContract("Fog")]
public class Fog : ImageEffect, IComponent, IReferencable, ICollectorHolder, IImageEffect, IGraphicsRenderer, IGraphicsRendererBase, IGraphicsRendererCore, IDisposable
| Name | Description | |
|---|---|---|
| Constructors | ||
| Fog() | Initializes a new instance of the Fog class. |
|
| Fog(String) | Initializes a new instance of the Fog class. |
|
| Properties | ||
| Color | ||
| Density | ||
| FogStart | ||
| SkipBackground | ||
| Methods | ||
| DrawCore(RenderDrawContext) | ||
| InitializeCore() | ||
| SetColorDepthInput(Texture, Texture, Single, Single) | Provides a color buffer and a depth buffer to apply the fog to. |
|
| SetDefaultParameters() | ||
Constructors
Fog()
Initializes a new instance of the Fog class.
public Fog()
Fog(String)
Initializes a new instance of the Fog class.
public Fog(string shaderName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | shaderName | Name of the fog shader. |
Properties
Color
[DataMember(20)]
public Color3 Color { get; set; }
Property Value
| Type | Description |
|---|---|
| Color3 |
Density
[DataMember(10)]
public float Density { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
FogStart
[DataMember(30)]
public float FogStart { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
SkipBackground
[DataMember(40)]
public bool SkipBackground { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Methods
DrawCore(RenderDrawContext)
protected override void DrawCore(RenderDrawContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderDrawContext | context |
Overrides
InitializeCore()
protected override void InitializeCore()
Overrides
SetColorDepthInput(Texture, Texture, Single, Single)
Provides a color buffer and a depth buffer to apply the fog to.
public void SetColorDepthInput(Texture colorBuffer, Texture depthBuffer, float zMin, float zMax)
Parameters
| Type | Name | Description |
|---|---|---|
| Texture | colorBuffer | A color buffer to process. |
| Texture | depthBuffer | The depth buffer corresponding to the color buffer provided. |
| System.Single | zMin | |
| System.Single | zMax |
SetDefaultParameters()
protected override void SetDefaultParameters()