Update on SimpleShader

Update on SimpleShader
It's been a while on this project, let's talk about some new things that went into this.

So, remember that JS module I wrote some months ago? Recently I've been working on it again with a bit of help from a friend named Spax (you can find him here). There's been a few changes on it, so I thought I'd give you an update.

First off, there is a proper repository for the project on my OneDev. I've even made a mirror on GitHub. You can even view a live demo here. But I also want to embed some examples into this post, see them below.

Secondly, this version takes actual .vert and .frag files, so you can have syntax highlighting in your editor. While this seems like it breaks compatibility, which it does, there is still an older version available here.

Third, this version supports video. It also supports resizing the canvas. Take a look.

Original shader by boysx. Video from a Twitch VOD of Ultrakill.

Here's the embed code used:

<canvas id="glitchy" width="720px" height="405px" style="width:100%;max-width:720px;"></canvas>
<script async type="module">
    import { SimpleShader as Shader } from "/assets/js/simple-shader.0.3.js";
    const s = new Shader("glitchy", {
        frag: "/content/files/glitchboi.frag",
        sampler2D: {
            sampler0: "/content/media/gamer-sudo.mp4"
        }
    });
    s.play();
</script>

And just for fun, here is Jamiroquai's Virtual Insanity, post-processed with a shader from Spax himself.

ngl this song still slaps years later

And the embed code:

<canvas id="virtual" width="720px" height="405px" style="width:100%;max-width:720px;"></canvas>
<script async type="module">
    import { SimpleShader as Shader } from "/assets/js/simple-shader.0.3.js";
    const s = new Shader("virtual", {
        frag: "/content/files/scatter.frag",
        sampler2D: {
            sampler0: "/content/media/virtual-insanity.mp4"
        }
    });
    s.play();
</script>

Huuuuuuuge special thanks to Spax for not only suggesting features and helping fix bugs, but also working with me to keep maintaining this project with even more features to come. That's all for now, thanks for reading!

And Merry Christmas, stay warm this winter and make sure to give a homeless