Skip to content
SiteEmail

cohtml.GlobalBackdropBlurFilter

Provides a default implementation of IGlobalBackdropFilter that applies a blur effect to the background. This class is automatically used as a fallback when no custom filter implementation is assigned. To apply a custom effect, create a class that implements IGlobalBackdropFilter and assign with CohtmlView.OnGlobalBackdropFilterAssign

Inherits from cohtml.IGlobalBackdropFilter, IDisposable

Name
GlobalBackdropBlurFilter(ViewRenderer renderer)
Sets up the required compute shaders and initializes the material used for the backdrop filter.
voidResize(float width, float height)
Updates the internal data structures and buffer sizes of the filter to match the specified view dimensions. This must be called whenever the target view is resized.
voidApplyGlobalBackdropFilter()
Executes the global backdrop filter effect for the current frame. Implementations of this method are responsible for capturing the background, applying the desired visual effect, and outputting the result to the appropriate render target or UI element.
voidDispose()
Name
intBlurRadius
Gets or sets the blur radius used for the backdrop filter. Controls how many neighboring pixels are sampled during the blur pass. Larger values result in a stronger blur effect but are more expensive to compute.
GlobalBackdropBlurFilter(
ViewRenderer renderer
)

Sets up the required compute shaders and initializes the material used for the backdrop filter.

Parameters:

  • renderer The view renderer instance managing this filter.
void Resize(
float width,
float height
)

Updates the internal data structures and buffer sizes of the filter to match the specified view dimensions. This must be called whenever the target view is resized.

Parameters:

  • width The new width of the view.
  • height The new height of the view.

Reimplements: cohtml.IGlobalBackdropFilter.Resize

void ApplyGlobalBackdropFilter()

Executes the global backdrop filter effect for the current frame. Implementations of this method are responsible for capturing the background, applying the desired visual effect, and outputting the result to the appropriate render target or UI element.

Reimplements: cohtml.IGlobalBackdropFilter.ApplyGlobalBackdropFilter

void Dispose()
int BlurRadius;

Gets or sets the blur radius used for the backdrop filter. Controls how many neighboring pixels are sampled during the blur pass. Larger values result in a stronger blur effect but are more expensive to compute.