Table of Contents

Class GPUVideoEffectBrightness

Namespace
VisioForge.Core.Types.VideoEffects
Assembly
VisioForge.Core.dll

GPU-accelerated brightness adjustment effect that modifies overall video luminance using DirectX hardware acceleration.

public class GPUVideoEffectBrightness : GPUVideoEffect, IGPUVideoEffectBrightness, IGPUVideoEffect

Inheritance

Implements

Inherited Members

Remarks

Available in: VideoCaptureCore, MediaPlayerCore, VideoEditCore (Windows only)

GPU-accelerated version using DirectX. Significantly faster than CPU equivalent for real-time processing of high-resolution video streams.

The brightness effect uniformly adjusts the luminance of all pixels by adding or subtracting a constant value from RGB color components. This creates a uniform lightening or darkening of the entire image while preserving color relationships and saturation. The adjustment operates in linear color space and is applied per-pixel using DirectX compute shaders, enabling real-time processing with minimal CPU overhead even at 4K resolutions.

Common use cases include: exposure correction for under/overexposed footage, creating day/night effects, mood adjustment for different scenes, preparing footage for color grading, correcting lighting inconsistencies, simulating time-of-day changes, and enhancing visibility in dark scenes. The effect maintains color balance by applying identical adjustments to all RGB channels.

Performance characteristics: GPU acceleration provides near-zero overhead for brightness adjustment, processing full 4K frames in under 1ms on modern GPUs. The operation is memory-bandwidth limited rather than compute-limited, making it one of the most efficient video effects. Can be combined with other effects without significant performance impact.

Technical notes: Values above 128 add luminance, values below subtract it. Extreme values may cause clipping where bright areas saturate to white (255) or dark areas to black (0), resulting in loss of detail. For best results, combine with contrast adjustment to maintain detail while changing overall exposure. The effect operates in RGB space; for perceptually uniform lightness adjustment, consider using HSL-based lightness effects instead.

Cross-reference to CPU equivalent: See VisioForge.Core.Types.VideoEffects.VideoEffectLightness for CPU-based HSL lightness adjustment.

Constructors

GPUVideoEffectBrightness(bool, int, string, TimeSpan, TimeSpan)

Initializes a new instance of the VisioForge.Core.Types.VideoEffects.GPUVideoEffectBrightness class with specified parameters.

public GPUVideoEffectBrightness(bool enabled, int value, string name = "Brightness", TimeSpan startTime = default, TimeSpan stopTime = default)

Parameters

enabled bool

Whether the effect is enabled. Set to true to apply immediately, false to create in disabled state.

value int

Brightness adjustment value (0-255, neutral at 128). Values outside range are clamped.

name string

Optional effect name for identification and retrieval. Default is "Brightness".

startTime TimeSpan

Start time for timed effects. Default is zero (apply from beginning).

stopTime TimeSpan

Stop time for timed effects. Default is zero (apply until end).

Remarks

When both start and stop times are zero, the effect applies for the entire video duration. The effect type is automatically set to VisioForge.Core.Types.VideoEffects.GPUVideoEffectType.Brightness. For subtle adjustments use values near 128 (±20), for dramatic effects use extreme values but expect potential detail loss.

Properties

Value

Gets or sets the brightness adjustment value (0-255, neutral at 128).

public int Value { get; set; }

Property Value

int

Remarks

Controls the luminance adjustment applied uniformly to all pixels. Value of 128 represents no change (neutral). Values above 128 lighten the image by adding to RGB components, values below darken by subtracting.

Value ranges: 0 = Maximum darkening (near black), 1-127 = Darkening, 128 = Neutral (no change), 129-255 = Lightening, 255 = Maximum lightening (near white). Extreme values may cause clipping and detail loss in highlights or shadows.

Methods

GetEffectType()

Gets the specific type of this GPU video effect.

public GPUVideoEffectType GetEffectType()

Returns

GPUVideoEffectType

Returns VisioForge.Core.Types.VideoEffects.GPUVideoEffectType.Brightness to identify this as a GPU-accelerated brightness effect.

Remarks

Used by the video processing pipeline to select the appropriate DirectX shader for brightness adjustment processing.