Class GLSquareVideoEffect
- Namespace
- VisioForge.Core.Types.X.OpenGL
- Assembly
- VisioForge.Core.dll
Applies a GPU-accelerated square pixelation effect to video frames using OpenGL shaders. This effect divides the video into a grid of square blocks, creating a mosaic or pixelated appearance by averaging colors within each block.
public class GLSquareVideoEffect : GLBaseVideoEffectInheritance
Inherited Members
Remarks
SDK Availability: Available in VideoCaptureCoreX, MediaPlayerCoreX, and Media Blocks SDK (Cross-platform)
Platform Support: Windows, Linux, macOS, Android, iOS (OpenGL ES)
GPU Acceleration: This effect uses hardware-accelerated OpenGL shaders to perform real-time pixelation entirely on the GPU. The block averaging operation is optimized using texture sampling techniques for efficient processing.
Effect Description: The square effect divides the video frame into a uniform grid of square blocks and replaces each block with a solid color representing the average (or sampled) color of that region. This creates a mosaic or pixelated appearance that reduces image detail while maintaining overall composition and color distribution. The effect intensity depends on the block size.
Use Cases:
- Privacy protection and censorship by obscuring faces or sensitive information
- Artistic and retro visual effects for creative video production
- Simulating low-resolution or 8-bit graphics aesthetics
- Transition effects between scenes or video segments
- Reducing bandwidth requirements by simplifying video content before compression
- Creating abstract or stylized video presentations
Performance: Moderate GPU computational requirements that scale with block size. Larger blocks (fewer squares) result in faster processing, while smaller blocks (more detail) require more texture samples. Typically adds 1-3ms per frame depending on block size configuration and GPU capabilities. Performance is optimized through GPU texture sampling hardware.
Constructors
GLSquareVideoEffect()
Initializes a new instance of the VisioForge.Core.Types.X.OpenGL.GLSquareVideoEffect class. Creates a square pixelation effect for GPU-accelerated video processing.
public GLSquareVideoEffect()