Table of Contents

Class WebGPUBackdropShaderLayerEffect

Namespace
SixLabors.ImageSharp.Drawing.Processing.Backends
Assembly
SixLabors.ImageSharp.Drawing.WebGPU.dll

Defines a backdrop effect with complete WGSL shader passes and an equivalent ImageSharp CPU fallback.

public abstract class WebGPUBackdropShaderLayerEffect : BackdropLayerEffect, IWebGPUShaderEffect
Inheritance
WebGPUBackdropShaderLayerEffect
Implements
Derived
Inherited Members

Remarks

Instances work with both drawing backends. WebGPU executes the configured WGSL passes, while CPU rendering executes the required fallback effect. Source follows the same complete-shader contract as WebGPUShaderLayerEffect.

Constructors

WebGPUBackdropShaderLayerEffect(BackdropLayerEffect, string, WebGPUShaderUniformLayout)

Initializes a new instance of the WebGPUBackdropShaderLayerEffect class.

protected WebGPUBackdropShaderLayerEffect(BackdropLayerEffect fallbackEffect, string shaderSource, WebGPUShaderUniformLayout uniformLayout)

Parameters

fallbackEffect BackdropLayerEffect

The equivalent backdrop effect used by CPU rendering.

shaderSource string

The complete WGSL source for each pass added by this effect.

uniformLayout WebGPUShaderUniformLayout

The named uniform values available to the shader.

WebGPUBackdropShaderLayerEffect(string, WebGPUShaderUniformLayout, Action<IImageProcessingContext>)

Initializes a new instance of the WebGPUBackdropShaderLayerEffect class.

protected WebGPUBackdropShaderLayerEffect(string shaderSource, WebGPUShaderUniformLayout uniformLayout, Action<IImageProcessingContext> fallback)

Parameters

shaderSource string

The complete WGSL source for each pass added by this effect.

uniformLayout WebGPUShaderUniformLayout

The named uniform values available to the shader.

fallback Action<IImageProcessingContext>

The equivalent operation used by CPU rendering.

Methods

AddShaderPass(BorderWrappingMode, BorderWrappingMode, Action<WebGPUShaderUniformBuilder>)

Configures and adds an invocation whose filtered samples use the supplied border modes.

protected void AddShaderPass(BorderWrappingMode xBorderMode, BorderWrappingMode yBorderMode, Action<WebGPUShaderUniformBuilder> configureUniforms)

Parameters

xBorderMode BorderWrappingMode

The wrapping mode applied beyond the horizontal input borders.

yBorderMode BorderWrappingMode

The wrapping mode applied beyond the vertical input borders.

configureUniforms Action<WebGPUShaderUniformBuilder>

The action that assigns this pass's named uniform values.

AddShaderPass(Action<WebGPUShaderUniformBuilder>)

Configures and adds an invocation of the complete shader source to this effect's ordered pass sequence.

protected void AddShaderPass(Action<WebGPUShaderUniformBuilder> configureUniforms)

Parameters

configureUniforms Action<WebGPUShaderUniformBuilder>

The action that assigns this pass's named uniform values.