Table of Contents

Class Fog

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

A fog filter.

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

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

shaderName string

Name of the fog shader.

Properties

Color

[DataMember(20)]
public Color3 Color { get; set; }

Property Value

Color3

Density

[DataMember(10)]
public float Density { get; set; }

Property Value

float

FogStart

[DataMember(30)]
public float FogStart { get; set; }

Property Value

float

SkipBackground

[DataMember(40)]
public bool SkipBackground { get; set; }

Property Value

bool

Methods

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, float, float)

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

colorBuffer Texture

A color buffer to process.

depthBuffer Texture

The depth buffer corresponding to the color buffer provided.

zMin float
zMax float

SetDefaultParameters()

Sets the default parameters (called at constructor time and if Reset() is called)

protected override void SetDefaultParameters()