Releases: sockmaster27/svader
Releases · sockmaster27/svader
v0.5.3
v0.5.2
- Significant improvements to detection of rendering failures in both WebGL and WebGPU.
- Add fallback for internal usage of ResizeObserverEntry.devicePixelContentBoxSize, which previously caused errors in the WebKit browser family.
v0.5.1
v0.5.0
Ensures full compatibility with both Svelte 4 and Svelte 5.
v0.4.1
Changes
Improve error message when passing a parameter where the value
field is undefined
.
v0.4.0
Changes
Rename all components from XFragmentShader
to XShader
Example
- <WebGpuFragmentShader
+ <WebGpuShader
code={shaderCode}
parameters={[
{
label: "Resolution",
binding: 0,
value: "resolution",
},
{
label: "Offset",
binding: 1,
value: "offset",
},
]}
>
</WebGpuShader>
Rename Parameter.data
to Parameter.value
Example
<WebGpuShader
code={shaderCode}
parameters={[
{
label: "Resolution",
binding: 0,
- data: "resolution",
+ value: "resolution",
},
{
label: "Offset",
binding: 1,
- data: "offset",
+ value: "offset",
},
]}
>
</WebGpuShader>
v0.3.0
Changes
WGSL entrypoint changed from fragmentMain
to main
Example
@group(0) @binding(0) var<uniform> resolution: vec2f;
@group(0) @binding(1) var<uniform> offset: vec2f;
@fragment
- fn fragmentMain(@builtin(position) raw_pos: vec4f) -> @location(0) vec4f {
+ fn main(@builtin(position) raw_pos: vec4f) -> @location(0) vec4f {
let pos = raw_pos.xy + offset;
let st = pos / resolution;
return vec4f(st, 0.0, 1.0);
}
WebGPU parameter type
is changed to optional storage
flag
Example
<WebGpuFragmentShader
width="500px"
height="500px"
code={shaderCode}
parameters={[
{
label: "Resolution",
binding: 0,
- type: "uniform",
data: "resolution",
},
{
label: "Offset",
binding: 1,
- type: "storage",
+ storage: true,
data: "offset",
},
]}
>
</WebGpuFragmentShader>
Drop support for fadeInDuration
for all components
Example
<WebGpuFragmentShader
- fadeInDuration=5
width="500px"
height="500px"
code={shaderCode}
parameters={[
{
label: "Resolution",
binding: 0,
data: "resolution",
},
{
label: "Offset",
binding: 1,
data: "offset",
},
]}
>
</WebGpuFragmentShader>
Support dynamically sized storage buffers in WebGPU
When passing in a storage buffer as a parameter to a WebGPU shader, the buffer will now be reallocated when the data changes its size.
Support passing in readonly
parameter list
Fixes the type declarations, such that it's now possible to pass in a parameter list marked as readonly
when using TypeScript.
Fixes
Both WebGPU and WebGL shaders will now explicitly destroy their resources when the component is dismounted.
v0.2.3
Cache compiled WebGPU shaders. This makes mounting the same component multiple times significantly faster.
v0.2.2
v0.2.2
v0.2.1
v0.2.1