Skip to content

Releases: sockmaster27/svader

v0.5.3

06 Jan 22:03
Compare
Choose a tag to compare

Update dead REPL links in README

v0.5.2

05 Jan 21:41
Compare
Choose a tag to compare
  • 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

19 Dec 10:15
Compare
Choose a tag to compare
  • Slight improvements to detection of rendering-failure on WebGPU.
  • Fixed dead link in README (Thanks @kevinji!)

v0.5.0

06 Nov 08:49
Compare
Choose a tag to compare

Ensures full compatibility with both Svelte 4 and Svelte 5.

v0.4.1

15 Oct 14:43
Compare
Choose a tag to compare

Changes

Improve error message when passing a parameter where the value field is undefined.

v0.4.0

01 Oct 20:24
Compare
Choose a tag to compare

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

27 Sep 11:52
Compare
Choose a tag to compare

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

24 Sep 11:16
Compare
Choose a tag to compare

Cache compiled WebGPU shaders. This makes mounting the same component multiple times significantly faster.

v0.2.2

13 Sep 17:26
Compare
Choose a tag to compare
v0.2.2

v0.2.1

10 Sep 20:57
Compare
Choose a tag to compare
v0.2.1