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
fallbackEffectBackdropLayerEffectThe equivalent backdrop effect used by CPU rendering.
shaderSourcestringThe complete WGSL source for each pass added by this effect.
uniformLayoutWebGPUShaderUniformLayoutThe 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
shaderSourcestringThe complete WGSL source for each pass added by this effect.
uniformLayoutWebGPUShaderUniformLayoutThe named uniform values available to the shader.
fallbackAction<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
xBorderModeBorderWrappingModeThe wrapping mode applied beyond the horizontal input borders.
yBorderModeBorderWrappingModeThe wrapping mode applied beyond the vertical input borders.
configureUniformsAction<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
configureUniformsAction<WebGPUShaderUniformBuilder>The action that assigns this pass's named uniform values.