Donner SVG main
0.8.0 ยท 382bd0190.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
FloodSource.h File Reference

Authoritative WGSL for feFlood. More...

#include "donner/gpu/shader/wgsl/Compiler.h"
Include dependency graph for FloodSource.h:

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Variables

constexpr wgsl::SourceText donner::gpu::shader::programs::kFloodSource
 Authoritative WGSL for feFlood.

Detailed Description

Authoritative WGSL for feFlood.

Variable Documentation

◆ kFloodSource

wgsl::SourceText donner::gpu::shader::programs::kFloodSource
inlineconstexpr
Initial value:
{R"wgsl(struct FloodParams {
color: vec4<f32>,
}
@group(0) @binding(0) var outputTexture: texture_storage_2d<rgba32float, write>;
@group(0) @binding(1) var<uniform> params: FloodParams;
@compute @workgroup_size(8, 8, 1)
fn cs_main(@builtin(global_invocation_id) gid: vec3<u32>) {
let extent = textureDimensions(outputTexture);
if (((gid.x >= extent.x) || (gid.y >= extent.y))) {
return;
}
let coords = vec2<i32>(gid.xy);
textureStore(outputTexture, coords, params.color);
}
)wgsl"}

Authoritative WGSL for feFlood.