Table of Contents

Class BrightFilter

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

An image effect that extracts the brightest parts of an input image to produce a bright-pass result.

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

Remarks

This effect is typically used as a pre-pass for post-processing effects such as bloom or light streaks. It computes the relative luminance of each pixel, builds a smooth selection mask from Threshold and Steepness, and multiplies the original color by that mask.

Constructors

BrightFilter()

Initializes a new instance of the BrightFilter class.

public BrightFilter()

BrightFilter(string)

Initializes a new instance of the BrightFilter class.

public BrightFilter(string brightPassShaderName)

Parameters

brightPassShaderName string

The name of the bright pass shader.

Exceptions

ArgumentNullException

brightPassShaderName is null.

Properties

Color

Gets or sets the color used to modulate the extracted bright areas.

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

Property Value

Color3

The modulation color applied to the filtered result.

Remarks

This is commonly used to tint the contribution that will later feed bloom, glare, or streak effects.

Steepness

Gets or sets how selectively the filter responds around the threshold.

[DataMember(15)]
public float Steepness { get; set; }

Property Value

float

This value affects the luminance remapping used before the smooth threshold is applied. Higher values make the filter more selective and reduce the contribution of mid-bright pixels. Lower values make the transition start earlier and allow more near-threshold pixels to contribute.

Threshold

Gets or sets the brightness threshold used to decide when a pixel starts contributing to the bright-pass result.

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

Property Value

float

The bright-pass threshold. Lower values allow more pixels to pass through the filter. Higher values restrict the result to only the brightest parts of the image.

Remarks

This value is best understood relative to the HDR intensity range of the image and, conceptually, to the scene white point used by the tone-mapping pipeline.

The term white point refers to the scene intensity that is considered reference white in the HDR pipeline, usually after exposure has been taken into account. In this effect, Threshold should be understood relative to that expected intensity range.

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()

SetDefaultParameters()

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

protected override void SetDefaultParameters()