Skip to content

PostProcessingServiceCollectionExtensions Class

Definition

Namespace: Brine2D.Rendering.SDL

C#
public static class PostProcessingServiceCollectionExtensions

Inheritance System.Object → PostProcessingServiceCollectionExtensions

Methods
AddBlurEffect\(this IServiceCollection, int, int, float\) Add a blur effect to the pipeline. Performs two-pass Gaussian blur \(horizontal \+ vertical\).
AddGrayscaleEffect\(this IServiceCollection, int, int, float\) Add a grayscale effect to the pipeline. Converts the rendered image to black and white using luminance calculation.
AddLetterbox\(this IServiceCollection, int, int, Nullable<Color>\) Adds a fixed-aspect-ratio/letterbox effect to the pipeline. The main render target \(and all game\-world rendering\) is fixed at designWidth x designHeight regardless of window size; this effect scales that output to fit the actual window, centered, filling the remainder with barColor. Always runs last in the pipeline.
AddPassThroughEffect\(this IServiceCollection, int, int\) Add a pass-through effect to the pipeline for testing. This effect does nothing but copy source to target.
AddPostProcessing\(this IServiceCollection, Action<PostProcessingOptions>\) Adds SDL3 post-processing support to the rendering pipeline. Call this after AddSDL3Rendering() to enable post-process effects.