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 a constant value to RGB color components. This creates a uniform lightening of the entire image: hue is preserved, while saturation drops as highlights approach white. The adjustment 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: the shader adds value / 255 to every RGB channel, so a value of 0 adds nothing and the image approaches white as the value grows to 255. Extreme values clip where bright areas saturate to white, resulting in loss of detail. For best results, combine with contrast adjustment to maintain detail while changing overall exposure.

Cross-reference to CPU equivalent: See VisioForge.Core.Types.VideoEffects.VideoEffectLightness for the CPU brightness adjustment with animation support.

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, 0 = no change). Each channel gains value / 255; 255 produces a white image.

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 up to ~50, for dramatic effects use extreme values but expect potential detail loss.

Properties

Value

Gets or sets the brightness adjustment value (0-255, 0 = no change).

public int Value { get; set; }

Property Value

int

Remarks

Controls the luminance adjustment applied uniformly to all pixels: value / 255 is added to each RGB channel. A value of 0 represents no change; the image approaches white as the value grows to 255.

Value ranges: 0 = No change, 1-127 = Mild to moderate lightening, 128 = Half-way to white, 200-254 = Strong lightening, 255 = White image. Extreme values clip highlights.

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.