diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-04-01 13:57:32 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-04-01 13:57:32 +0200 |
| commit | e579ae120290329fd697b50ea9138ffccb65a805 (patch) | |
| tree | 12a63ee60b00e5004a1806ddf3ebd70c012e3e28 /apps/web/src/lib/shaders/jfa-init.frag.glsl | |
| parent | b048b739bd598f9d9ff97166f29bcb6e37c40607 (diff) | |
| download | opencut-e579ae120290329fd697b50ea9138ffccb65a805.tar.gz | |
feat: migrate GPU renderer from WebGL to wgpu/WASM
Diffstat (limited to 'apps/web/src/lib/shaders/jfa-init.frag.glsl')
| -rw-r--r-- | apps/web/src/lib/shaders/jfa-init.frag.glsl | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/apps/web/src/lib/shaders/jfa-init.frag.glsl b/apps/web/src/lib/shaders/jfa-init.frag.glsl deleted file mode 100644 index e465752c..00000000 --- a/apps/web/src/lib/shaders/jfa-init.frag.glsl +++ /dev/null @@ -1,25 +0,0 @@ -precision mediump float;
-
-uniform sampler2D u_texture;
-uniform vec2 u_resolution;
-uniform float u_invert;
-
-varying vec2 v_texCoord;
-
-void main() {
- float mask = texture2D(u_texture, v_texCoord).r;
- bool isSeed = u_invert > 0.5 ? mask < 0.5 : mask > 0.5;
-
- if (isSeed) {
- vec2 pixelCoord = floor(v_texCoord * u_resolution);
- float x = pixelCoord.x;
- float y = pixelCoord.y;
- float xHi = floor(x / 256.0);
- float xLo = x - xHi * 256.0;
- float yHi = floor(y / 256.0);
- float yLo = y - yHi * 256.0;
- gl_FragColor = vec4(xHi / 255.0, xLo / 255.0, yHi / 255.0, yLo / 255.0);
- } else {
- gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
- }
-}
|
