summaryrefslogtreecommitdiff
path: root/workspaces/main
diff options
context:
space:
mode:
Diffstat (limited to 'workspaces/main')
-rw-r--r--workspaces/main/assets.txt1
-rw-r--r--workspaces/main/shaders/cnn/cnn_conv1x1.wgsl4
-rw-r--r--workspaces/main/shaders/cnn/cnn_conv3x3.wgsl46
-rw-r--r--workspaces/main/shaders/cnn/cnn_layer.wgsl5
-rw-r--r--workspaces/main/shaders/cnn/cnn_weights_generated.wgsl454
-rw-r--r--workspaces/main/shaders/common_uniforms.wgsl14
-rw-r--r--workspaces/main/shaders/ellipse.wgsl2
-rw-r--r--workspaces/main/shaders/particle_spray_compute.wgsl2
-rw-r--r--workspaces/main/timeline.seq165
-rw-r--r--workspaces/main/timeline.seq.backup105
10 files changed, 511 insertions, 287 deletions
diff --git a/workspaces/main/assets.txt b/workspaces/main/assets.txt
index af8b9e9..750bf15 100644
--- a/workspaces/main/assets.txt
+++ b/workspaces/main/assets.txt
@@ -37,6 +37,7 @@ SHADER_ELLIPSE, NONE, shaders/ellipse.wgsl, "Ellipse Shader"
SHADER_PARTICLE_SPRAY_COMPUTE, NONE, shaders/particle_spray_compute.wgsl, "Particle Spray Compute"
SHADER_GAUSSIAN_BLUR, NONE, shaders/gaussian_blur.wgsl, "Gaussian Blur Shader"
SHADER_CNN_ACTIVATION, NONE, shaders/cnn/cnn_activation.wgsl, "CNN Activation Functions"
+SHADER_CNN_CONV1X1, NONE, shaders/cnn/cnn_conv1x1.wgsl, "CNN 1x1 Convolution"
SHADER_CNN_CONV3X3, NONE, shaders/cnn/cnn_conv3x3.wgsl, "CNN 3x3 Convolution"
SHADER_CNN_CONV5X5, NONE, shaders/cnn/cnn_conv5x5.wgsl, "CNN 5x5 Convolution"
SHADER_CNN_CONV7X7, NONE, shaders/cnn/cnn_conv7x7.wgsl, "CNN 7x7 Convolution"
diff --git a/workspaces/main/shaders/cnn/cnn_conv1x1.wgsl b/workspaces/main/shaders/cnn/cnn_conv1x1.wgsl
index d468182..f77cfa8 100644
--- a/workspaces/main/shaders/cnn/cnn_conv1x1.wgsl
+++ b/workspaces/main/shaders/cnn/cnn_conv1x1.wgsl
@@ -44,7 +44,7 @@ fn cnn_conv1x1_7to4_src(
) -> vec4<f32> {
let step = 1.0 / resolution;
- let original = (textureSample(tex, samp, uv) - 0.5) * 2.0;
+ var original = (textureSample(tex, samp, uv) - 0.5) * 2.0;
let gray = dot(original.rgb, vec3<f32>(0.2126, 0.7152, 0.0722));
let uv_norm = (uv - 0.5) * 2.0;
let in1 = vec4<f32>(uv_norm, gray, 1.0);
@@ -55,7 +55,7 @@ fn cnn_conv1x1_7to4_src(
for (var dy = -0; dy <= 0; dy++) {
for (var dx = -0; dx <= 0; dx++) {
let offset = vec2<f32>(f32(dx), f32(dy)) * step;
- let rgbd = (textureSample(tex, samp, uv + offset) - 0.5) * 2.0;
+ var rgbd = (textureSample(tex, samp, uv + offset) - 0.5) * 2.0;
sum.r += dot(weights[pos+0], rgbd) + dot(weights[pos+1], in1);
sum.g += dot(weights[pos+2], rgbd) + dot(weights[pos+3], in1);
diff --git a/workspaces/main/shaders/cnn/cnn_conv3x3.wgsl b/workspaces/main/shaders/cnn/cnn_conv3x3.wgsl
index 48bb392..f7d11b1 100644
--- a/workspaces/main/shaders/cnn/cnn_conv3x3.wgsl
+++ b/workspaces/main/shaders/cnn/cnn_conv3x3.wgsl
@@ -1,33 +1,26 @@
// 3x3 convolution (vec4-optimized)
-// Source layers: 7→4 channels (RGBD output)
-// Assumes 'tex' (the input) is *not* normalized to [-1,1], but is [0,1]
-// UV coordinates remain in [0,1] and are normalized internally
-// weights: array<vec4<f32>, 72> (9 pos × 4 ch × 2 vec4)
-fn cnn_conv3x3_7to4_src(
+// Inner layers: 7→4 channels (vec4-optimized)
+// Assumes 'tex' is already normalized to [-1,1]
+fn cnn_conv3x3_7to4(
tex: texture_2d<f32>,
samp: sampler,
uv: vec2<f32>,
resolution: vec2<f32>,
+ gray: f32,
weights: array<vec4<f32>, 72>
) -> vec4<f32> {
let step = 1.0 / resolution;
-
- // Compute grayscale from original (converted in [-1,1])
- let original = (textureSample(tex, samp, uv) - 0.5) * 2.0;
- let gray = dot(original.rgb, vec3<f32>(0.2126, 0.7152, 0.0722));
-
- // Normalize UV to [-1,1]
let uv_norm = (uv - 0.5) * 2.0;
- let in1 = vec4<f32>(uv_norm, gray, 1.0);
var sum = vec4<f32>(0.0);
-
var pos = 0;
+
for (var dy = -1; dy <= 1; dy++) {
for (var dx = -1; dx <= 1; dx++) {
let offset = vec2<f32>(f32(dx), f32(dy)) * step;
- let rgbd = (textureSample(tex, samp, uv + offset) - .5) * 2.0;
+ let rgbd = textureSample(tex, samp, uv + offset);
+ let in1 = vec4<f32>(uv_norm, gray, 1.0);
sum.r += dot(weights[pos+0], rgbd) + dot(weights[pos+1], in1);
sum.g += dot(weights[pos+2], rgbd) + dot(weights[pos+3], in1);
@@ -40,31 +33,29 @@ fn cnn_conv3x3_7to4_src(
return sum;
}
-// Inner layers: 7→4 channels (vec4-optimized)
-// Assumes 'tex' is already normalized to [-1,1]
-// UV coordinates remain in [0,1] and are normalized internally
-// weights: array<vec4<f32>, 72> (9 pos × 4 ch × 2 vec4)
-fn cnn_conv3x3_7to4(
+// Source layer: 7→4 channels (vec4-optimized)
+// Normalizes [0,1] input to [-1,1] internally
+fn cnn_conv3x3_7to4_src(
tex: texture_2d<f32>,
samp: sampler,
uv: vec2<f32>,
resolution: vec2<f32>,
- gray: f32,
weights: array<vec4<f32>, 72>
) -> vec4<f32> {
let step = 1.0 / resolution;
- // Normalize UV to [-1,1]
+ let original = (textureSample(tex, samp, uv) - 0.5) * 2.0;
+ let gray = dot(original.rgb, vec3<f32>(0.2126, 0.7152, 0.0722));
let uv_norm = (uv - 0.5) * 2.0;
+ let in1 = vec4<f32>(uv_norm, gray, 1.0);
var sum = vec4<f32>(0.0);
-
var pos = 0;
+
for (var dy = -1; dy <= 1; dy++) {
for (var dx = -1; dx <= 1; dx++) {
let offset = vec2<f32>(f32(dx), f32(dy)) * step;
- let rgbd = textureSample(tex, samp, uv + offset);
- let in1 = vec4<f32>(uv_norm, gray, 1.0);
+ let rgbd = (textureSample(tex, samp, uv + offset) - 0.5) * 2.0;
sum.r += dot(weights[pos+0], rgbd) + dot(weights[pos+1], in1);
sum.g += dot(weights[pos+2], rgbd) + dot(weights[pos+3], in1);
@@ -79,8 +70,7 @@ fn cnn_conv3x3_7to4(
// Final layer: 7→1 channel (vec4-optimized)
// Assumes 'tex' is already normalized to [-1,1]
-// UV coordinates remain in [0,1] and are normalized internally
-// weights: array<vec4<f32>, 18> (9 pos × 2 vec4)
+// Returns raw sum (activation applied at call site)
fn cnn_conv3x3_7to1(
tex: texture_2d<f32>,
samp: sampler,
@@ -90,14 +80,12 @@ fn cnn_conv3x3_7to1(
weights: array<vec4<f32>, 18>
) -> f32 {
let step = 1.0 / resolution;
-
- // Normalize UV to [-1,1]
let uv_norm = (uv - 0.5) * 2.0;
let in1 = vec4<f32>(uv_norm, gray, 1.0);
var sum = 0.0;
-
var pos = 0;
+
for (var dy = -1; dy <= 1; dy++) {
for (var dx = -1; dx <= 1; dx++) {
let offset = vec2<f32>(f32(dx), f32(dy)) * step;
diff --git a/workspaces/main/shaders/cnn/cnn_layer.wgsl b/workspaces/main/shaders/cnn/cnn_layer.wgsl
index 73816c6..cbd1686 100644
--- a/workspaces/main/shaders/cnn/cnn_layer.wgsl
+++ b/workspaces/main/shaders/cnn/cnn_layer.wgsl
@@ -8,6 +8,7 @@
#include "common_uniforms"
#include "cnn_activation"
#include "cnn_conv3x3"
+#include "cnn_conv5x5"
#include "cnn_weights_generated"
struct CNNLayerParams {
@@ -32,12 +33,12 @@ struct CNNLayerParams {
let uv = (p.xy - 0.5) / (uniforms.resolution - 1.0);
let original_raw = textureSample(original_input, smplr, uv);
let original = (original_raw - 0.5) * 2.0; // Normalize to [-1,1]
- let gray = dot(original.rgb, vec3<f32>(0.2126, 0.7152, 0.0722));
+ let gray = (dot(original_raw.rgb, vec3<f32>(0.2126, 0.7152, 0.0722)) - 0.5) * 2.0;
var result = vec4<f32>(0.0);
// Layer 0: 7→4 (RGBD output, normalizes [0,1] input)
if (params.layer_index == 0) {
- result = cnn_conv3x3_7to4_src(txt, smplr, uv, uniforms.resolution, weights_layer0);
+ result = cnn_conv5x5_7to4_src(txt, smplr, uv, uniforms.resolution, weights_layer0);
result = cnn_tanh(result);
}
else if (params.layer_index == 1) {
diff --git a/workspaces/main/shaders/cnn/cnn_weights_generated.wgsl b/workspaces/main/shaders/cnn/cnn_weights_generated.wgsl
index b0ea94a..510f86f 100644
--- a/workspaces/main/shaders/cnn/cnn_weights_generated.wgsl
+++ b/workspaces/main/shaders/cnn/cnn_weights_generated.wgsl
@@ -1,174 +1,302 @@
// Auto-generated CNN weights (vec4-optimized)
// DO NOT EDIT - Generated by train_cnn.py
-const weights_layer0: array<vec4<f32>, 72> = array(
- vec4<f32>(-0.044026, 0.047628, -0.063265, 0.218504),
- vec4<f32>(-0.190022, -0.135119, -0.081008, 0.099647),
- vec4<f32>(-0.283728, -0.120157, -0.016922, 0.053865),
- vec4<f32>(0.086367, -0.126319, -0.150105, 0.182299),
- vec4<f32>(0.202147, 0.136897, 0.107852, -0.172833),
- vec4<f32>(0.064442, -0.233385, -0.018957, -0.228280),
- vec4<f32>(0.071521, 0.098132, -0.040425, -0.063967),
- vec4<f32>(0.165120, 0.211831, 0.059642, -0.057744),
- vec4<f32>(0.274886, 0.228993, 0.188158, 0.205993),
- vec4<f32>(0.075958, 0.041069, 0.387262, 0.099647),
- vec4<f32>(0.147526, 0.113838, 0.063860, 0.094863),
- vec4<f32>(0.019145, -0.029763, 0.182342, 0.182299),
- vec4<f32>(-0.043916, 0.052574, 0.111200, -0.222292),
- vec4<f32>(-0.105018, -0.183294, -0.101293, -0.228280),
- vec4<f32>(-0.226260, -0.126595, -0.194007, -0.232597),
- vec4<f32>(-0.046487, 0.081828, -0.265402, -0.057744),
- vec4<f32>(0.157029, 0.267859, 0.601152, 0.075284),
- vec4<f32>(-0.020990, -0.051241, 0.225214, 0.099647),
- vec4<f32>(0.063772, 0.069126, 0.113609, 0.160308),
- vec4<f32>(0.028664, -0.008940, 0.121347, 0.182299),
- vec4<f32>(-0.011553, 0.015435, 0.024504, -0.185267),
- vec4<f32>(-0.204193, -0.133882, -0.136576, -0.228280),
- vec4<f32>(-0.129196, 0.035281, -0.257606, -0.228596),
- vec4<f32>(-0.208470, 0.177381, -0.007807, -0.057744),
- vec4<f32>(-0.167317, -0.116130, -0.294129, 0.148693),
- vec4<f32>(-0.034772, -0.031158, -0.007236, 0.099647),
- vec4<f32>(-0.027831, 0.042411, -0.088279, 0.096020),
- vec4<f32>(0.057835, 0.021072, 0.016300, 0.182299),
- vec4<f32>(0.023852, 0.054272, 0.095647, -0.064063),
- vec4<f32>(-0.092098, -0.274072, 0.102436, -0.228280),
- vec4<f32>(-0.062181, -0.175155, -0.084286, -0.254635),
- vec4<f32>(-0.021370, -0.054084, -0.094507, -0.057744),
- vec4<f32>(0.163740, 0.418951, 0.236017, 0.168628),
- vec4<f32>(-0.072125, -0.004540, 0.243056, 0.099647),
- vec4<f32>(0.137025, 0.252152, 0.089128, 0.212421),
- vec4<f32>(-0.111771, -0.086444, 0.200819, 0.182299),
- vec4<f32>(-0.111774, -0.136604, 0.106531, -0.035990),
- vec4<f32>(-0.104085, -0.185459, -0.028727, -0.228280),
- vec4<f32>(-0.195858, -0.185688, -0.057940, -0.110030),
- vec4<f32>(0.119684, 0.015679, -0.282928, -0.057744),
- vec4<f32>(0.182249, 0.183774, 0.485198, 0.283122),
- vec4<f32>(0.073703, -0.066022, 0.369654, 0.099647),
- vec4<f32>(0.153869, 0.214244, 0.123994, 0.015235),
- vec4<f32>(-0.032879, -0.127768, 0.153828, 0.182299),
- vec4<f32>(0.020066, -0.187911, -0.002227, -0.188773),
- vec4<f32>(-0.018035, -0.176750, 0.025871, -0.228280),
- vec4<f32>(0.003240, -0.110074, -0.137812, -0.099725),
- vec4<f32>(-0.030633, -0.135231, 0.025956, -0.057744),
- vec4<f32>(-0.362614, -0.213325, -0.263322, 0.096670),
- vec4<f32>(-0.032143, 0.081475, -0.343777, 0.099647),
- vec4<f32>(-0.297917, -0.083748, -0.133821, 0.091547),
- vec4<f32>(-0.037656, 0.022276, -0.011297, 0.182299),
- vec4<f32>(0.161341, 0.086857, 0.165727, -0.090049),
- vec4<f32>(-0.081491, -0.282614, 0.025270, -0.228280),
- vec4<f32>(0.090399, 0.050758, 0.107328, -0.038184),
- vec4<f32>(0.070251, 0.011528, -0.091525, -0.057744),
- vec4<f32>(-0.056355, -0.009971, -0.150000, 0.235577),
- vec4<f32>(-0.095561, -0.065592, -0.089876, 0.099647),
- vec4<f32>(0.091840, 0.128219, -0.083141, 0.169319),
- vec4<f32>(-0.046781, 0.121648, 0.103069, 0.182299),
- vec4<f32>(-0.096114, -0.144242, 0.084139, -0.106471),
- vec4<f32>(-0.027582, -0.292333, 0.076865, -0.228280),
- vec4<f32>(0.075125, 0.031164, 0.130597, -0.157298),
- vec4<f32>(-0.056810, -0.046527, 0.091355, -0.057744),
- vec4<f32>(-0.187192, -0.008480, -0.099564, 0.320084),
- vec4<f32>(-0.023413, 0.142330, -0.207555, 0.099647),
- vec4<f32>(0.060672, -0.047472, 0.057659, 0.195330),
- vec4<f32>(0.092087, 0.119028, -0.038835, 0.182299),
- vec4<f32>(-0.008512, 0.075632, 0.019646, -0.134091),
- vec4<f32>(0.017238, -0.226524, -0.049809, -0.228280),
- vec4<f32>(0.026540, 0.106392, 0.130047, -0.184493),
- vec4<f32>(-0.176890, -0.118572, 0.130286, -0.057744)
+const weights_layer0: array<vec4<f32>, 200> = array(
+ vec4<f32>(0.235493, 0.070711, -0.007171, 0.029242),
+ vec4<f32>(0.010796, -0.007094, 0.104870, -0.001741),
+ vec4<f32>(-0.363645, 0.625662, 0.044248, 0.046890),
+ vec4<f32>(0.016731, -0.099652, 0.198682, -0.002050),
+ vec4<f32>(-0.738196, -1.196639, -0.153794, 0.059818),
+ vec4<f32>(-0.012392, 0.206094, -1.159788, 0.001624),
+ vec4<f32>(-0.089846, -0.097056, 0.533546, -0.256308),
+ vec4<f32>(0.052460, 0.007740, -0.025518, -0.011569),
+ vec4<f32>(0.024563, -0.123127, -0.189236, -0.034605),
+ vec4<f32>(0.027494, 0.077022, -0.073083, -0.001741),
+ vec4<f32>(0.127897, -1.191688, -0.289229, -0.057213),
+ vec4<f32>(-0.017651, -0.095915, -0.540725, -0.002050),
+ vec4<f32>(0.459141, 1.047422, 1.008783, 0.082279),
+ vec4<f32>(-0.148789, 0.141891, 0.964934, 0.001624),
+ vec4<f32>(-0.458732, -0.253084, 0.429181, -0.267647),
+ vec4<f32>(0.029582, 0.043901, -0.332350, -0.011569),
+ vec4<f32>(-0.089206, -0.379760, -0.267976, -0.033062),
+ vec4<f32>(-0.059616, 0.042331, -0.297211, -0.001741),
+ vec4<f32>(0.347450, 0.349807, -0.107598, -0.038193),
+ vec4<f32>(-0.054979, -0.022737, 0.368773, -0.002050),
+ vec4<f32>(1.185666, 2.203693, 1.743948, 0.015765),
+ vec4<f32>(-0.004807, 0.138734, 2.114184, 0.001624),
+ vec4<f32>(-0.397312, -0.423930, 0.436068, -0.309529),
+ vec4<f32>(-0.025822, 0.061618, -0.358850, -0.011569),
+ vec4<f32>(0.031591, -0.133625, -0.210201, -0.058735),
+ vec4<f32>(0.026377, 0.074180, -0.075918, -0.001741),
+ vec4<f32>(-0.632064, -0.365984, -0.183357, -0.064294),
+ vec4<f32>(-0.038233, -0.027135, -0.529794, -0.002050),
+ vec4<f32>(-0.079942, -0.108489, 0.284420, 0.068003),
+ vec4<f32>(-0.033783, 0.131316, -0.006431, 0.001624),
+ vec4<f32>(-0.096003, -0.037157, 0.523401, -0.332369),
+ vec4<f32>(0.098362, 0.049597, 0.024988, -0.011569),
+ vec4<f32>(-0.042374, 0.215371, 0.044488, -0.079190),
+ vec4<f32>(-0.108483, 0.244548, 0.195395, -0.001741),
+ vec4<f32>(0.121079, 0.214838, 0.292411, -0.013912),
+ vec4<f32>(0.098564, -0.117552, 0.392438, -0.002050),
+ vec4<f32>(-0.994368, -0.526871, 0.165568, 0.006371),
+ vec4<f32>(-0.142932, 0.234835, -0.612723, 0.001624),
+ vec4<f32>(-0.430247, -0.230031, 0.035994, -0.340101),
+ vec4<f32>(-0.134622, -0.045299, -0.264801, -0.011569),
+ vec4<f32>(-0.116651, 0.042012, -0.004781, 0.018667),
+ vec4<f32>(0.000405, -0.068494, 0.084279, -0.001741),
+ vec4<f32>(0.180754, -0.853766, -0.384955, 0.013426),
+ vec4<f32>(0.038369, 0.010519, -0.437544, -0.002050),
+ vec4<f32>(0.373661, 0.677625, 0.617145, -0.028541),
+ vec4<f32>(0.071383, 0.012678, 0.734573, 0.001624),
+ vec4<f32>(-0.187586, -0.167658, 0.445526, -0.213674),
+ vec4<f32>(-0.054012, -0.048233, -0.111101, -0.011569),
+ vec4<f32>(-0.329708, 0.124956, 0.150447, 0.038372),
+ vec4<f32>(0.042139, -0.014901, 0.056693, -0.001741),
+ vec4<f32>(0.547166, 1.493724, 0.572366, 0.044038),
+ vec4<f32>(-0.055818, 0.022352, 1.209448, -0.002050),
+ vec4<f32>(-0.669255, -0.481531, -0.593402, 0.125846),
+ vec4<f32>(-0.086191, -0.012315, -0.692654, 0.001624),
+ vec4<f32>(-0.667836, -0.543086, 0.253854, -0.236805),
+ vec4<f32>(0.045048, 0.047535, -0.607491, -0.011569),
+ vec4<f32>(-0.262418, 0.247133, 0.225155, -0.084126),
+ vec4<f32>(0.017065, 0.007371, 0.103683, -0.001741),
+ vec4<f32>(0.216644, 1.179116, 0.436799, 0.041116),
+ vec4<f32>(0.006571, 0.012147, 0.674660, -0.002050),
+ vec4<f32>(0.290965, -0.022340, -0.616338, 0.021808),
+ vec4<f32>(-0.091234, -0.016764, 0.116976, 0.001624),
+ vec4<f32>(-0.689736, -0.685681, 0.342797, -0.213249),
+ vec4<f32>(0.040683, 0.038921, -0.663171, -0.011569),
+ vec4<f32>(-0.150412, 0.018053, -0.103426, 0.026070),
+ vec4<f32>(0.016183, -0.090006, 0.028738, -0.001741),
+ vec4<f32>(0.851827, -0.499315, 0.146696, 0.047324),
+ vec4<f32>(0.059725, 0.031269, 0.184268, -0.002050),
+ vec4<f32>(0.160719, -0.309456, -0.432633, -0.021171),
+ vec4<f32>(-0.060075, -0.052701, -0.248520, 0.001624),
+ vec4<f32>(-0.217727, 0.354527, 0.663356, -0.267530),
+ vec4<f32>(-0.032714, 0.000761, 0.246687, -0.011569),
+ vec4<f32>(0.077123, 0.069934, 0.077986, 0.004388),
+ vec4<f32>(-0.107897, 0.103689, 0.072698, -0.001741),
+ vec4<f32>(-0.216285, -0.206663, -0.497913, -0.019433),
+ vec4<f32>(0.042063, -0.036315, -0.306115, -0.002050),
+ vec4<f32>(0.351038, 0.116104, -0.046132, 0.022280),
+ vec4<f32>(-0.026460, -0.025197, 0.286924, 0.001624),
+ vec4<f32>(-0.480131, -0.253209, -0.259724, -0.353796),
+ vec4<f32>(-0.069436, -0.026651, -0.285359, -0.011569),
+ vec4<f32>(0.225811, -0.092313, -0.152689, 0.007505),
+ vec4<f32>(0.120530, 0.012846, -0.020303, -0.001741),
+ vec4<f32>(0.305262, 0.699468, 0.474383, -0.002565),
+ vec4<f32>(-0.036377, 0.008052, 0.424588, -0.002050),
+ vec4<f32>(0.557323, 0.489104, 0.312243, 0.072877),
+ vec4<f32>(0.096476, -0.012612, 0.586454, 0.001624),
+ vec4<f32>(-0.370964, -0.252666, 0.235903, -0.299915),
+ vec4<f32>(-0.066341, -0.008435, -0.158507, -0.011569),
+ vec4<f32>(0.070604, -0.016186, -0.079075, 0.015055),
+ vec4<f32>(0.042533, -0.085281, -0.014053, -0.001741),
+ vec4<f32>(-1.115748, -0.531544, -0.207050, -0.040691),
+ vec4<f32>(0.010035, -0.008330, -0.718958, -0.002050),
+ vec4<f32>(-1.404958, -2.000416, -1.884062, 0.014171),
+ vec4<f32>(0.019375, -0.078894, -1.999592, 0.001624),
+ vec4<f32>(-1.144367, -0.681485, 0.145197, -0.310542),
+ vec4<f32>(0.071912, -0.001021, -0.817277, -0.011569),
+ vec4<f32>(-0.018298, 0.109930, -0.067419, -0.031281),
+ vec4<f32>(0.072086, -0.047123, -0.018405, -0.001741),
+ vec4<f32>(-2.926982, -5.479454, -1.936543, 0.034851),
+ vec4<f32>(0.005592, 0.052238, -4.695754, -0.002050),
+ vec4<f32>(0.504616, -0.384917, -0.623795, 0.009371),
+ vec4<f32>(-0.105685, -0.049385, -0.154266, 0.001624),
+ vec4<f32>(-1.428979, -0.829611, 0.160294, -0.239524),
+ vec4<f32>(0.054180, -0.058797, -0.939519, -0.011569),
+ vec4<f32>(0.088147, -0.158820, -0.199674, -0.083067),
+ vec4<f32>(0.073984, -0.059593, -0.103344, -0.001741),
+ vec4<f32>(0.465084, 2.259005, 0.899806, -0.010464),
+ vec4<f32>(0.058231, -0.075668, 1.383652, -0.002050),
+ vec4<f32>(-0.162736, -0.899540, -0.559890, 0.066380),
+ vec4<f32>(0.029594, 0.036117, -0.780812, 0.001624),
+ vec4<f32>(-0.605431, 0.342970, 0.671602, -0.313734),
+ vec4<f32>(0.072950, 0.058100, 0.232742, -0.011569),
+ vec4<f32>(0.161941, -0.017279, -0.010904, -0.041589),
+ vec4<f32>(-0.118079, 0.090886, 0.001212, -0.001741),
+ vec4<f32>(-0.136354, 0.155269, 0.058437, -0.043499),
+ vec4<f32>(0.029368, 0.079326, -0.060807, -0.002050),
+ vec4<f32>(0.222824, 0.267939, 0.010260, 0.093258),
+ vec4<f32>(-0.091763, 0.028527, 0.290062, 0.001624),
+ vec4<f32>(-0.584501, -0.074002, -0.187352, -0.247388),
+ vec4<f32>(-0.067679, -0.036398, -0.237425, -0.011569),
+ vec4<f32>(-0.026121, -0.231360, 0.002505, -0.096021),
+ vec4<f32>(0.073173, -0.059323, -0.128630, -0.001741),
+ vec4<f32>(-0.118509, -0.931686, -0.328151, 0.027222),
+ vec4<f32>(0.006670, -0.094619, -0.605555, -0.002050),
+ vec4<f32>(0.260254, 0.186958, 0.235441, -0.030871),
+ vec4<f32>(0.111987, -0.056380, 0.227175, 0.001624),
+ vec4<f32>(0.012446, -0.068683, 0.273271, -0.315052),
+ vec4<f32>(-0.020011, 0.046984, 0.026316, -0.011569),
+ vec4<f32>(0.149830, 0.108146, 0.141757, 0.040947),
+ vec4<f32>(-0.060874, -0.004303, 0.196782, -0.001741),
+ vec4<f32>(1.031257, 1.493831, 0.443644, -0.089572),
+ vec4<f32>(-0.035087, 0.049431, 1.193984, -0.002050),
+ vec4<f32>(-0.204666, -0.340174, -0.045684, 0.053997),
+ vec4<f32>(0.000214, -0.073696, -0.299299, 0.001624),
+ vec4<f32>(-1.040674, -0.828753, 0.007912, -0.326534),
+ vec4<f32>(0.040669, -0.036526, -0.794626, -0.011569),
+ vec4<f32>(-0.018212, -0.031610, 0.259871, -0.041978),
+ vec4<f32>(0.021055, -0.061307, -0.004348, -0.001741),
+ vec4<f32>(0.002720, 0.570871, 0.371837, -0.076940),
+ vec4<f32>(0.023420, 0.006175, 0.318983, -0.002050),
+ vec4<f32>(0.259713, 0.294528, 0.907401, 0.043367),
+ vec4<f32>(-0.087576, -0.053953, 0.273380, 0.001624),
+ vec4<f32>(-1.177213, -0.464727, 0.211285, -0.266637),
+ vec4<f32>(0.075274, -0.007404, -0.703821, -0.011569),
+ vec4<f32>(-0.089204, -0.053316, 0.280138, -0.056155),
+ vec4<f32>(0.030981, -0.005136, 0.038455, -0.001741),
+ vec4<f32>(0.936459, -0.196866, 0.270033, -0.096884),
+ vec4<f32>(0.025329, -0.032176, 0.473732, -0.002050),
+ vec4<f32>(0.312348, 0.234105, 0.580837, 0.099177),
+ vec4<f32>(0.019877, -0.096514, 0.450075, 0.001624),
+ vec4<f32>(-1.099700, -0.203693, 0.157253, -0.331450),
+ vec4<f32>(-0.033353, -0.072074, -0.453590, -0.011569),
+ vec4<f32>(-0.084598, -0.039735, 0.162495, -0.070988),
+ vec4<f32>(-0.038491, 0.071525, 0.034601, -0.001741),
+ vec4<f32>(-0.199528, -0.475454, -0.297979, 0.037322),
+ vec4<f32>(-0.003106, 0.003258, -0.475664, -0.002050),
+ vec4<f32>(-0.282845, 0.058921, -0.300971, -0.011632),
+ vec4<f32>(-0.102320, 0.065302, -0.035173, 0.001624),
+ vec4<f32>(-0.515296, 0.497936, 0.313751, -0.245144),
+ vec4<f32>(-0.126936, 0.016721, 0.233370, -0.011569),
+ vec4<f32>(-0.220154, 0.069414, 0.194344, 0.000786),
+ vec4<f32>(0.037788, -0.095021, -0.055585, -0.001741),
+ vec4<f32>(-0.186244, 0.434960, 0.138978, -0.017604),
+ vec4<f32>(0.014466, 0.055976, 0.306540, -0.002050),
+ vec4<f32>(0.000614, -0.087365, -0.327816, 0.025776),
+ vec4<f32>(0.227096, -0.143725, -0.046319, 0.001624),
+ vec4<f32>(0.468607, -0.441809, -0.025186, -0.260166),
+ vec4<f32>(0.018770, -0.067388, -0.240128, -0.011569),
+ vec4<f32>(-0.013968, 0.032027, -0.111361, -0.023976),
+ vec4<f32>(0.041929, -0.033460, 0.001994, -0.001741),
+ vec4<f32>(0.005203, -0.837762, -0.287991, -0.026139),
+ vec4<f32>(-0.077592, 0.021388, -0.524153, -0.002050),
+ vec4<f32>(0.250865, 0.313428, -0.248465, 0.059517),
+ vec4<f32>(0.034922, -0.054528, 0.257107, 0.001624),
+ vec4<f32>(0.010692, -0.067238, 0.233031, -0.310017),
+ vec4<f32>(0.176915, -0.059644, 0.016072, -0.011569),
+ vec4<f32>(0.016422, 0.016187, -0.037382, -0.083725),
+ vec4<f32>(0.002691, -0.110865, -0.012957, -0.001741),
+ vec4<f32>(0.095561, 0.396829, 0.128803, 0.037097),
+ vec4<f32>(0.019823, 0.093399, 0.310928, -0.002050),
+ vec4<f32>(-0.193791, -0.079385, 0.332894, 0.039734),
+ vec4<f32>(0.119291, -0.053947, 0.020449, 0.001624),
+ vec4<f32>(-0.446965, -0.003325, 0.231982, -0.298212),
+ vec4<f32>(0.063248, -0.060392, -0.103558, -0.011569),
+ vec4<f32>(-0.044501, -0.246630, -0.254448, -0.025872),
+ vec4<f32>(0.044620, -0.074284, -0.183828, -0.001741),
+ vec4<f32>(-0.369636, -0.171104, -0.485456, -0.085980),
+ vec4<f32>(-0.053131, 0.016452, -0.377567, -0.002050),
+ vec4<f32>(-0.183644, -0.028271, 0.226453, 0.010102),
+ vec4<f32>(0.039391, -0.132828, -0.009034, 0.001624),
+ vec4<f32>(-0.644046, -0.335421, 0.011161, -0.222670),
+ vec4<f32>(0.091183, 0.005457, -0.472058, -0.011569),
+ vec4<f32>(0.045107, 0.080623, -0.132791, 0.064920),
+ vec4<f32>(-0.110745, 0.109524, 0.092569, -0.001741),
+ vec4<f32>(0.064397, 0.190407, 0.257845, 0.024637),
+ vec4<f32>(-0.042557, 0.128625, 0.317239, -0.002050),
+ vec4<f32>(-0.362482, 0.271381, -0.115412, 0.103104),
+ vec4<f32>(0.088766, 0.042583, 0.069687, 0.001624),
+ vec4<f32>(-0.353634, 0.554832, 0.442496, -0.351794),
+ vec4<f32>(-0.140207, -0.064649, 0.346336, -0.011569)
);
const weights_layer1: array<vec4<f32>, 72> = array(
- vec4<f32>(-0.550220, -0.217290, 0.172294, 0.131499),
- vec4<f32>(0.087800, -0.013060, -0.012493, -0.118784),
- vec4<f32>(0.414634, 0.110057, -0.148279, -0.164066),
- vec4<f32>(-0.067937, 0.015316, 0.110874, 0.170621),
- vec4<f32>(0.202338, 0.237349, -0.198003, -0.018883),
- vec4<f32>(0.096353, -0.033149, -0.075566, -0.012686),
- vec4<f32>(0.540664, -0.019039, -0.187934, -0.017433),
- vec4<f32>(-0.093819, -0.032389, -0.075676, -0.045023),
- vec4<f32>(-0.454297, -0.094218, 0.153827, 0.131527),
- vec4<f32>(-0.075634, 0.034528, -0.179401, -0.118784),
- vec4<f32>(0.250372, 0.110398, -0.088627, -0.247025),
- vec4<f32>(-0.017120, -0.036461, 0.085890, 0.170621),
- vec4<f32>(0.157555, 0.055556, -0.209897, -0.072719),
- vec4<f32>(0.009895, 0.007367, -0.068084, -0.012686),
- vec4<f32>(0.470887, -0.026009, -0.130709, -0.190289),
- vec4<f32>(0.042477, 0.099113, 0.024500, -0.045023),
- vec4<f32>(0.004836, -0.032572, 0.196070, 0.127080),
- vec4<f32>(-0.094058, -0.110672, -0.099101, -0.118784),
- vec4<f32>(0.251474, 0.026879, -0.072475, -0.221995),
- vec4<f32>(0.004570, 0.095751, 0.241107, 0.170621),
- vec4<f32>(-0.039411, 0.212567, -0.146248, -0.181935),
- vec4<f32>(-0.048444, -0.100834, -0.040524, -0.012686),
- vec4<f32>(0.279418, 0.027548, -0.172508, -0.243648),
- vec4<f32>(-0.072080, 0.084367, -0.125451, -0.045023),
- vec4<f32>(-0.762915, -0.254977, 0.125205, 0.235909),
- vec4<f32>(-0.038104, -0.075417, -0.146520, -0.118784),
- vec4<f32>(0.339557, 0.229433, -0.050644, -0.131365),
- vec4<f32>(-0.129065, -0.050450, 0.095530, 0.170621),
- vec4<f32>(0.256145, 0.078530, -0.183619, -0.206955),
- vec4<f32>(-0.050830, -0.048353, 0.147183, -0.012686),
- vec4<f32>(0.581766, -0.000920, -0.038922, -0.233026),
- vec4<f32>(0.054928, 0.125764, 0.045640, -0.045023),
- vec4<f32>(-0.656914, -0.193329, 0.142118, 0.112047),
- vec4<f32>(0.055497, -0.066662, -0.127356, -0.118784),
- vec4<f32>(0.381869, 0.121043, -0.193973, -0.053474),
- vec4<f32>(-0.135338, 0.102084, 0.047766, 0.170621),
- vec4<f32>(0.157373, 0.108581, -0.056749, -0.190385),
- vec4<f32>(0.059588, -0.079601, 0.116529, -0.012686),
- vec4<f32>(0.615891, -0.003999, -0.044733, -0.233113),
- vec4<f32>(-0.013833, 0.158467, 0.069948, -0.045023),
- vec4<f32>(-0.370423, -0.001432, 0.188960, 0.234769),
- vec4<f32>(-0.067498, 0.029365, -0.139773, -0.118784),
- vec4<f32>(0.397838, 0.223050, -0.266812, -0.218634),
- vec4<f32>(0.026448, -0.063605, 0.172133, 0.170621),
- vec4<f32>(0.091567, 0.082715, -0.157309, -0.080454),
- vec4<f32>(0.164888, -0.075561, 0.031425, -0.012686),
- vec4<f32>(0.211481, 0.062354, -0.139909, -0.166563),
- vec4<f32>(-0.052356, 0.195890, 0.002621, -0.045023),
- vec4<f32>(-0.722615, -0.098662, 0.050131, 0.208800),
- vec4<f32>(0.015331, 0.048369, 0.020104, -0.118784),
- vec4<f32>(0.510514, 0.267948, -0.167085, -0.073239),
- vec4<f32>(0.013588, 0.029198, 0.011374, 0.170621),
- vec4<f32>(0.434384, 0.234026, -0.016845, -0.053492),
- vec4<f32>(0.048535, -0.021576, 0.119118, -0.012686),
- vec4<f32>(0.504202, 0.059151, -0.076747, -0.100093),
- vec4<f32>(0.065644, 0.111175, 0.023457, -0.045023),
- vec4<f32>(-0.589185, -0.167617, 0.017656, 0.154815),
- vec4<f32>(-0.068627, 0.014695, -0.001009, -0.118784),
- vec4<f32>(0.477531, 0.147435, -0.190240, -0.063934),
- vec4<f32>(0.092949, 0.164573, 0.090508, 0.170621),
- vec4<f32>(0.216511, 0.208554, -0.094266, -0.180448),
- vec4<f32>(0.027521, -0.009373, 0.038030, -0.012686),
- vec4<f32>(0.373956, 0.047154, 0.029470, -0.198022),
- vec4<f32>(0.054003, 0.064209, 0.009144, -0.045023),
- vec4<f32>(-0.357275, -0.065495, 0.150350, 0.111417),
- vec4<f32>(0.071622, -0.082439, -0.197320, -0.118784),
- vec4<f32>(0.422302, 0.061022, -0.108647, -0.244366),
- vec4<f32>(-0.058943, 0.114681, -0.041863, 0.170621),
- vec4<f32>(0.238027, -0.022158, 0.021928, -0.176080),
- vec4<f32>(-0.059569, 0.164817, 0.009572, -0.012686),
- vec4<f32>(0.285508, -0.027414, -0.011562, -0.042465),
- vec4<f32>(0.125779, 0.231493, -0.069255, -0.045023)
+ vec4<f32>(-0.059078, -0.087833, -0.048345, -0.276761),
+ vec4<f32>(-0.101904, 0.058647, -0.405575, -0.064215),
+ vec4<f32>(-0.382952, 0.579364, -0.051813, -0.155723),
+ vec4<f32>(-0.140997, -0.006771, 0.212267, 0.120289),
+ vec4<f32>(-0.152651, -0.134768, -0.076617, -0.506104),
+ vec4<f32>(0.089304, 0.078492, 0.541122, 0.129289),
+ vec4<f32>(0.739323, -0.014103, -0.012980, -0.112747),
+ vec4<f32>(-0.089971, -0.088661, -0.520901, 0.158290),
+ vec4<f32>(0.819725, 2.866048, 0.080441, 0.380885),
+ vec4<f32>(0.035196, 0.028422, -0.748029, -0.064215),
+ vec4<f32>(-0.551722, 0.995924, -0.203047, -0.220742),
+ vec4<f32>(-0.081721, 0.039584, 0.581791, 0.120289),
+ vec4<f32>(-0.752329, -0.482903, -0.317275, 0.515372),
+ vec4<f32>(-0.087637, 0.040969, 0.481261, 0.129289),
+ vec4<f32>(0.532382, -0.653574, 0.078268, 0.139585),
+ vec4<f32>(-0.089350, -0.072701, -1.289249, 0.158290),
+ vec4<f32>(0.384272, -0.051717, 0.428463, -0.006561),
+ vec4<f32>(0.034003, 0.036653, -0.778556, -0.064215),
+ vec4<f32>(-0.788796, 0.332339, -0.181283, -0.213141),
+ vec4<f32>(0.196044, -0.062422, 0.724631, 0.120289),
+ vec4<f32>(-0.416297, -0.520778, -0.009510, -0.304383),
+ vec4<f32>(0.094475, -0.033135, 0.942838, 0.129289),
+ vec4<f32>(0.887455, 0.054078, 0.193434, 0.268549),
+ vec4<f32>(-0.055369, -0.042953, -0.172902, 0.158290),
+ vec4<f32>(0.419144, -0.159019, 0.189637, -0.235703),
+ vec4<f32>(-0.098285, 0.021026, -0.041846, -0.064215),
+ vec4<f32>(-1.009575, 0.934207, -0.120383, -0.243756),
+ vec4<f32>(-0.054562, 0.123804, 0.004157, 0.120289),
+ vec4<f32>(-0.504099, 0.696545, -0.850290, 0.493131),
+ vec4<f32>(-0.090043, -0.020600, -1.148702, 0.129289),
+ vec4<f32>(0.302269, -0.662429, 0.315052, -0.276341),
+ vec4<f32>(-0.084626, -0.029208, -0.799132, 0.158290),
+ vec4<f32>(0.318365, 2.531235, 0.349606, 0.231242),
+ vec4<f32>(0.053525, -0.031474, -0.570432, -0.064215),
+ vec4<f32>(-0.635031, 0.498836, 0.009884, -0.465079),
+ vec4<f32>(0.059087, 0.038415, 0.009928, 0.120289),
+ vec4<f32>(-0.522592, -3.781285, 0.418296, -0.608186),
+ vec4<f32>(0.100879, -0.083891, 1.653884, 0.129289),
+ vec4<f32>(0.258571, 2.590279, 0.221239, -0.143175),
+ vec4<f32>(0.121409, -0.084177, -1.397735, 0.158290),
+ vec4<f32>(0.907284, -0.034063, 0.573987, -0.125626),
+ vec4<f32>(-0.017610, -0.059485, -0.242599, -0.064215),
+ vec4<f32>(-0.748146, 0.686047, -0.074510, -0.248879),
+ vec4<f32>(-0.034986, -0.121423, -0.406087, 0.120289),
+ vec4<f32>(-0.559352, -2.921763, -0.718019, -0.764524),
+ vec4<f32>(0.165658, 0.097044, 0.773885, 0.129289),
+ vec4<f32>(0.006276, -0.801820, 0.215264, 0.115919),
+ vec4<f32>(0.081513, -0.023028, -0.590423, 0.158290),
+ vec4<f32>(-0.207850, 0.088171, -0.173170, 0.351969),
+ vec4<f32>(-0.042732, -0.024059, -0.087492, -0.064215),
+ vec4<f32>(-0.711148, 0.312318, -0.145549, -0.113749),
+ vec4<f32>(0.053038, 0.093166, -0.473856, 0.120289),
+ vec4<f32>(-0.343481, -0.137305, -0.340862, 0.445920),
+ vec4<f32>(-0.070473, -0.024914, -0.735660, 0.129289),
+ vec4<f32>(0.212955, -0.200508, 0.105125, -0.165284),
+ vec4<f32>(-0.123633, 0.052941, 0.099918, 0.158290),
+ vec4<f32>(0.362468, -0.709693, 0.281097, -0.155976),
+ vec4<f32>(-0.034566, 0.002014, 0.443026, -0.064215),
+ vec4<f32>(-0.346208, 1.179972, -0.563868, -0.424647),
+ vec4<f32>(0.012676, -0.023351, -0.703819, 0.120289),
+ vec4<f32>(-0.476282, -0.001002, -0.456911, -0.143433),
+ vec4<f32>(0.061018, -0.051173, -0.992671, 0.129289),
+ vec4<f32>(0.340925, -0.869046, 0.333377, -0.070414),
+ vec4<f32>(0.022279, 0.022837, -0.389711, 0.158290),
+ vec4<f32>(0.217347, -0.092030, -0.004346, 0.209850),
+ vec4<f32>(-0.116637, -0.096003, -0.333961, -0.064215),
+ vec4<f32>(-0.105262, 0.443411, -0.443104, 0.032732),
+ vec4<f32>(0.014939, 0.058855, -0.723723, 0.120289),
+ vec4<f32>(-0.598907, -0.166341, -0.635385, 0.463685),
+ vec4<f32>(0.151976, 0.049510, 0.155364, 0.129289),
+ vec4<f32>(0.138981, -0.109141, 0.272429, 0.190495),
+ vec4<f32>(-0.005729, 0.020860, -0.062157, 0.158290)
);
const weights_layer2: array<vec4<f32>, 18> = array(
- vec4<f32>(-0.005880, 0.219661, 0.076830, 0.031369),
- vec4<f32>(0.019447, -0.157183, -0.072867, 0.019890),
- vec4<f32>(-0.190992, 0.094952, 0.243652, 0.101839),
- vec4<f32>(-0.073730, -0.097028, 0.130087, 0.019890),
- vec4<f32>(-0.048538, 0.255178, 0.072403, 0.162183),
- vec4<f32>(0.068563, -0.177353, -0.031857, 0.019890),
- vec4<f32>(-0.075366, 0.082456, 0.196628, 0.101995),
- vec4<f32>(-0.061104, -0.091889, -0.083985, 0.019890),
- vec4<f32>(-0.249014, 0.051544, 0.211691, -0.042091),
- vec4<f32>(0.002831, 0.053599, 0.029920, 0.019890),
- vec4<f32>(-0.048174, 0.040130, 0.219902, 0.065074),
- vec4<f32>(0.034129, -0.058673, -0.094574, 0.019890),
- vec4<f32>(-0.249925, 0.243446, 0.268119, 0.031839),
- vec4<f32>(-0.151316, 0.014516, -0.058603, 0.019890),
- vec4<f32>(-0.207769, 0.219873, 0.041389, 0.142059),
- vec4<f32>(0.036077, 0.056158, -0.059980, 0.019890),
- vec4<f32>(-0.100513, 0.210483, 0.012164, 0.071910),
- vec4<f32>(0.130846, 0.074247, -0.018889, 0.019890)
+ vec4<f32>(0.043207, -0.056041, 0.131565, 0.116278),
+ vec4<f32>(-0.038849, -0.028105, -0.112979, 0.023741),
+ vec4<f32>(-0.010112, -0.085145, 0.257510, 0.245113),
+ vec4<f32>(0.041108, 0.049255, -0.082008, 0.023741),
+ vec4<f32>(0.012368, -0.035856, 0.018924, 0.174452),
+ vec4<f32>(0.052554, 0.039427, -0.279445, 0.023741),
+ vec4<f32>(-0.160061, -0.232735, 0.256951, 0.208887),
+ vec4<f32>(-0.088352, 0.100106, 0.103566, 0.023741),
+ vec4<f32>(-0.406607, -1.336396, 0.454171, 0.310834),
+ vec4<f32>(-0.061166, 0.105463, 1.572779, 0.023741),
+ vec4<f32>(-0.188413, -0.523344, 0.082813, 0.209113),
+ vec4<f32>(0.052509, -0.069748, -0.065008, 0.023741),
+ vec4<f32>(-0.124016, 0.005237, 0.177859, 0.138953),
+ vec4<f32>(0.072167, 0.070582, -0.209545, 0.023741),
+ vec4<f32>(-0.384457, -0.186386, 0.273595, 0.235457),
+ vec4<f32>(-0.032392, -0.086899, -0.006561, 0.023741),
+ vec4<f32>(-0.195800, 0.017395, 0.023080, 0.181437),
+ vec4<f32>(-0.035524, -0.095398, -0.204917, 0.023741)
);
diff --git a/workspaces/main/shaders/common_uniforms.wgsl b/workspaces/main/shaders/common_uniforms.wgsl
index ce1be53..1ab8939 100644
--- a/workspaces/main/shaders/common_uniforms.wgsl
+++ b/workspaces/main/shaders/common_uniforms.wgsl
@@ -1,11 +1,11 @@
struct CommonUniforms {
- resolution: vec2<f32>,
- _pad0: f32,
- _pad1: f32,
- aspect_ratio: f32,
- time: f32,
- beat: f32,
- audio_intensity: f32,
+ resolution: vec2<f32>, // Screen dimensions
+ aspect_ratio: f32, // Width/height ratio
+ time: f32, // Physical time in seconds (unaffected by tempo)
+ beat_time: f32, // Musical time in beats (absolute, tempo-scaled)
+ beat_phase: f32, // Fractional beat (0.0-1.0 within current beat)
+ audio_intensity: f32, // Audio peak for beat sync
+ _pad: f32, // Padding
};
struct GlobalUniforms {
view_proj: mat4x4<f32>,
diff --git a/workspaces/main/shaders/ellipse.wgsl b/workspaces/main/shaders/ellipse.wgsl
index 05dfcfc..69b2712 100644
--- a/workspaces/main/shaders/ellipse.wgsl
+++ b/workspaces/main/shaders/ellipse.wgsl
@@ -46,6 +46,6 @@ fn sdEllipse(p: vec2<f32>, ab: vec2<f32>) -> f32 {
@fragment fn fs_main(@builtin(position) p: vec4<f32>) -> @location(0) vec4<f32> {
let uv = (p.xy / uniforms.resolution - 0.5) * 2.0;
let movement = vec2<f32>(sin(uniforms.time * 0.7), cos(uniforms.time * 0.5));
- let d = sdEllipse((uv * vec2<f32>(uniforms.aspect_ratio, 1.0)) - movement, vec2<f32>(0.5, 0.3) * (1.0 + uniforms.beat * 0.2));
+ let d = sdEllipse((uv * vec2<f32>(uniforms.aspect_ratio, 1.0)) - movement, vec2<f32>(0.5, 0.3) * (1.0 + uniforms.beat_phase * 0.2));
return mix(vec4<f32>(0.2, 0.8, 0.4, 1.0), vec4<f32>(0.0), smoothstep(0.0, 0.01, d));
}
diff --git a/workspaces/main/shaders/particle_spray_compute.wgsl b/workspaces/main/shaders/particle_spray_compute.wgsl
index a4041f2..4b6e48f 100644
--- a/workspaces/main/shaders/particle_spray_compute.wgsl
+++ b/workspaces/main/shaders/particle_spray_compute.wgsl
@@ -29,7 +29,7 @@ fn main(@builtin(global_invocation_id) id: vec3<u32>) {
p.color = vec4<f32>(hash(r + 0.1), hash(r + 0.2), 1.0, 1.0);
}
let new_pos = p.pos.xyz + p.vel.xyz * 0.016;
- p.pos = vec4<f32>(new_pos, p.pos.w - 0.01 * (1.0 + uniforms.beat));
+ p.pos = vec4<f32>(new_pos, p.pos.w - 0.01 * (1.0 + uniforms.beat_phase));
p.vel.y = p.vel.y - 0.01;
particles[i] = p;
}
diff --git a/workspaces/main/timeline.seq b/workspaces/main/timeline.seq
index 42d81a0..ab9e40d 100644
--- a/workspaces/main/timeline.seq
+++ b/workspaces/main/timeline.seq
@@ -2,103 +2,104 @@
# Generated by Timeline Editor
# BPM 120
-SEQUENCE 0.00 0
- EFFECT - FlashCubeEffect 0.00 2.44
- EFFECT + FlashEffect 0.00 1.00 color=1.0,0.5,0.5 decay=0.95
- EFFECT + FadeEffect 0.10 1.00
- EFFECT + SolarizeEffect 0.00 2.00
- EFFECT + VignetteEffect 0.00 2.50 radius=0.6 softness=0.1
+SEQUENCE 0.00s 0
+EFFECT - FlashCubeEffect 0.00s 2.44s
+EFFECT + FlashEffect 0.00s 1.00s color=1.0,0.5,0.5 decay=0.95
+EFFECT + FadeEffect 0.10s 1.00s
+EFFECT + SolarizeEffect 0.00s 2.00s
+EFFECT + VignetteEffect 0.00s 2.50s radius=0.6 softness=0.1
-SEQUENCE 2.50 0 "rotating cube"
- EFFECT + CircleMaskEffect 0.00 4.00 0.50
- EFFECT + RotatingCubeEffect 0.00 4.00
- EFFECT + GaussianBlurEffect 1.00 2.00 strength=1.0
- EFFECT + GaussianBlurEffect 3.00 4.00 strength=2.0
+SEQUENCE 2.50s 0 "rotating cube"
+EFFECT + CircleMaskEffect 0.00s 4.00s 0.50
+EFFECT + RotatingCubeEffect 0.00s 4.00s
+EFFECT + GaussianBlurEffect 1.00s 2.00s strength=1.0
+EFFECT + GaussianBlurEffect 3.00s 4.00s strength=2.0
-SEQUENCE 5.93 0
- EFFECT - FlashCubeEffect 0.11 1.45
- EFFECT + FlashEffect 0.00 0.20
+SEQUENCE 5.93s 0
+EFFECT - FlashCubeEffect 0.11s 1.45s
+EFFECT + FlashEffect 0.00s 0.20s
-SEQUENCE 6.90 1 "spray"
- EFFECT + ParticleSprayEffect 0.00 2.00
- EFFECT + ParticlesEffect 0.00 3.00
- EFFECT = GaussianBlurEffect 0.00 2.00 strength=3.0
+SEQUENCE 6.90s 1 "spray"
+EFFECT + ParticleSprayEffect 0.00s 2.00s
+EFFECT + ParticlesEffect 0.00s 3.00s
+EFFECT = GaussianBlurEffect 0.00s 2.00s strength=3.0
-SEQUENCE 8.50 2 "Hybrid3D"
- EFFECT + ThemeModulationEffect 0.00 2.00
- EFFECT + HeptagonEffect 0.20 2.00
- EFFECT + ParticleSprayEffect 0.00 2.00
- EFFECT = ParticlesEffect 0.00 2.00
- EFFECT + Hybrid3DEffect 0.00 2.00
- EFFECT + GaussianBlurEffect 0.00 2.00
- EFFECT + ChromaAberrationEffect 0.00 1.50 offset=0.01 angle=1.57
+SEQUENCE 8.50s 2 "Hybrid3D"
+EFFECT + ThemeModulationEffect 0.00s 2.00s
+EFFECT + HeptagonEffect 0.20s 2.00s
+EFFECT + ParticleSprayEffect 0.00s 2.00s
+EFFECT = ParticlesEffect 0.00s 2.00s
+EFFECT + Hybrid3DEffect 0.00s 2.00s
+EFFECT + GaussianBlurEffect 0.00s 2.00s
+EFFECT + CNNEffect 0.0s 2.0s layers=3 blend=.9
+# EFFECT + ChromaAberrationEffect 0.00 1.50 offset=0.01 angle=1.57
-SEQUENCE 10.50 0 "CNN effect"
- EFFECT + HeptagonEffect 0.0 12.00
+SEQUENCE 10.50s 0 "CNN effect"
+EFFECT + HeptagonEffect 0.0s 12.00s
# EFFECT + RotatingCubeEffect 0.00 12.0
# EFFECT + Hybrid3DEffect 0.00 12.00
- EFFECT + Scene1Effect 0.0 12.0
- EFFECT + CNNEffect 1.0 12.0 layers=3 blend=.5
+EFFECT + Scene1Effect 0.0s 12.0s
+EFFECT + CNNEffect 1.0s 12.0s layers=3 blend=.5
-SEQUENCE 22.0 0 "buggy"
- EFFECT + HeptagonEffect 0.00 0.20
- EFFECT + FadeEffect 0.11 1.01
+SEQUENCE 22.0s 0 "buggy"
+EFFECT + HeptagonEffect 0.00s 0.20s
+EFFECT + FadeEffect 0.11s 1.01s
-SEQUENCE 22.14 3
- EFFECT + ThemeModulationEffect 0.00 4.00
- EFFECT = HeptagonEffect 0.00 4.00
- EFFECT + GaussianBlurEffect 0.00 5.00 strength=1.5
- EFFECT + ChromaAberrationEffect 0.00 5.00 offset=0.03 angle=0.785
- EFFECT + SolarizeEffect 0.00 5.00
+SEQUENCE 22.14s 3
+EFFECT + ThemeModulationEffect 0.00s 4.00s
+EFFECT = HeptagonEffect 0.00s 4.00s
+EFFECT + GaussianBlurEffect 0.00s 5.00s strength=1.5
+EFFECT + ChromaAberrationEffect 0.00s 5.00s offset=0.03 angle=0.785
+EFFECT + SolarizeEffect 0.00s 5.00s
-SEQUENCE 23.00 2
- EFFECT - FlashCubeEffect 0.20 1.50
- EFFECT + HeptagonEffect 0.00 2.00
- EFFECT + ParticleSprayEffect 0.00 2.00
- EFFECT + ParticlesEffect 0.00 2.00
+SEQUENCE 23.00s 2
+EFFECT - FlashCubeEffect 0.20s 1.50s
+EFFECT + HeptagonEffect 0.00s 2.00s
+EFFECT + ParticleSprayEffect 0.00s 2.00s
+EFFECT + ParticlesEffect 0.00s 2.00s
-SEQUENCE 22.75 2 "Fade"
- EFFECT - FlashCubeEffect 0.20 1.50
- EFFECT + FlashEffect 0.00 1.00
+SEQUENCE 22.75s 2 "Fade"
+EFFECT - FlashCubeEffect 0.20s 1.50s
+EFFECT + FlashEffect 0.00s 1.00s
-SEQUENCE 23.88 10
- EFFECT - FlashCubeEffect 0.20 1.50
- EFFECT + GaussianBlurEffect 0.00 2.00
- EFFECT + FlashEffect 0.00 0.20
- EFFECT = FlashEffect 0.50 0.20
+SEQUENCE 23.88s 10
+EFFECT - FlashCubeEffect 0.20s 1.50s
+EFFECT + GaussianBlurEffect 0.00s 2.00s
+EFFECT + FlashEffect 0.00s 0.20s
+EFFECT = FlashEffect 0.50s 0.20s
-SEQUENCE 25.59 1
- EFFECT + ThemeModulationEffect 0.00 8.00
- EFFECT + HeptagonEffect 0.20 2.00
- EFFECT + ParticleSprayEffect 0.00 8.00
- EFFECT + Hybrid3DEffect 0.00 8.06
- EFFECT + GaussianBlurEffect 0.00 8.00
- EFFECT + ChromaAberrationEffect 0.00 8.14
- EFFECT + SolarizeEffect 0.00 7.88
+SEQUENCE 25.59s 1
+EFFECT + ThemeModulationEffect 0.00s 8.00s
+EFFECT + HeptagonEffect 0.20s 2.00s
+EFFECT + ParticleSprayEffect 0.00s 8.00s
+EFFECT + Hybrid3DEffect 0.00s 8.06s
+EFFECT + GaussianBlurEffect 0.00s 8.00s
+EFFECT + ChromaAberrationEffect 0.00s 8.14s
+EFFECT + SolarizeEffect 0.00s 7.88s
-SEQUENCE 33.08 0
- EFFECT + ThemeModulationEffect 0.00 3.00
- EFFECT + VignetteEffect 0.00 3.00 radius=0.6 softness=0.3
- EFFECT + SolarizeEffect 0.00 3.00
+SEQUENCE 33.08s 0
+EFFECT + ThemeModulationEffect 0.00s 3.00s
+EFFECT + VignetteEffect 0.00s 3.00s radius=0.6 softness=0.3
+EFFECT + SolarizeEffect 0.00s 3.00s
-SEQUENCE 35.31 0
- EFFECT + ThemeModulationEffect 0.00 4.00
- EFFECT + HeptagonEffect 0.20 2.00
- EFFECT + GaussianBlurEffect 0.00 8.00
- EFFECT + SolarizeEffect 0.00 2.00
+SEQUENCE 35.31s 0
+EFFECT + ThemeModulationEffect 0.00s 4.00s
+EFFECT + HeptagonEffect 0.20s 2.00s
+EFFECT + GaussianBlurEffect 0.00s 8.00s
+EFFECT + SolarizeEffect 0.00s 2.00s
-SEQUENCE 42.29 0
- EFFECT + ThemeModulationEffect 0.00 6.00
- EFFECT = HeptagonEffect 0.20 2.00
- EFFECT + Hybrid3DEffect 0.00 4.00
- EFFECT + ParticleSprayEffect 0.00 5.50
- EFFECT + HeptagonEffect 0.00 8.00
- EFFECT + ChromaAberrationEffect 0.00 7.50
- EFFECT + GaussianBlurEffect 0.00 8.00
+SEQUENCE 42.29s 0
+EFFECT + ThemeModulationEffect 0.00s 6.00s
+EFFECT = HeptagonEffect 0.20s 2.00s
+EFFECT + Hybrid3DEffect 0.00s 4.00s
+EFFECT + ParticleSprayEffect 0.00s 5.50s
+EFFECT + HeptagonEffect 0.00s 8.00s
+EFFECT + ChromaAberrationEffect 0.00s 7.50s
+EFFECT + GaussianBlurEffect 0.00s 8.00s
-SEQUENCE 50.02 0
- EFFECT + ThemeModulationEffect 0.00 4.00
- EFFECT + HeptagonEffect 0.00 9.50
- EFFECT + ChromaAberrationEffect 0.00 9.00
- EFFECT + GaussianBlurEffect 0.00 8.00
+SEQUENCE 50.02s 0
+EFFECT + ThemeModulationEffect 0.00s 4.00s
+EFFECT + HeptagonEffect 0.00s 9.50s
+EFFECT + ChromaAberrationEffect 0.00s 9.00s
+EFFECT + GaussianBlurEffect 0.00s 8.00s
diff --git a/workspaces/main/timeline.seq.backup b/workspaces/main/timeline.seq.backup
new file mode 100644
index 0000000..c3e2316
--- /dev/null
+++ b/workspaces/main/timeline.seq.backup
@@ -0,0 +1,105 @@
+# Demo Timeline
+# Generated by Timeline Editor
+# BPM 120
+
+SEQUENCE 0.00 0
+ EFFECT - FlashCubeEffect 0.00 2.44
+ EFFECT + FlashEffect 0.00 1.00 color=1.0,0.5,0.5 decay=0.95
+ EFFECT + FadeEffect 0.10 1.00
+ EFFECT + SolarizeEffect 0.00 2.00
+ EFFECT + VignetteEffect 0.00 2.50 radius=0.6 softness=0.1
+
+SEQUENCE 2.50 0 "rotating cube"
+ EFFECT + CircleMaskEffect 0.00 4.00 0.50
+ EFFECT + RotatingCubeEffect 0.00 4.00
+ EFFECT + GaussianBlurEffect 1.00 2.00 strength=1.0
+ EFFECT + GaussianBlurEffect 3.00 4.00 strength=2.0
+
+SEQUENCE 5.93 0
+ EFFECT - FlashCubeEffect 0.11 1.45
+ EFFECT + FlashEffect 0.00 0.20
+
+SEQUENCE 6.90 1 "spray"
+ EFFECT + ParticleSprayEffect 0.00 2.00
+ EFFECT + ParticlesEffect 0.00 3.00
+ EFFECT = GaussianBlurEffect 0.00 2.00 strength=3.0
+
+SEQUENCE 8.50 2 "Hybrid3D"
+ EFFECT + ThemeModulationEffect 0.00 2.00
+ EFFECT + HeptagonEffect 0.20 2.00
+ EFFECT + ParticleSprayEffect 0.00 2.00
+ EFFECT = ParticlesEffect 0.00 2.00
+ EFFECT + Hybrid3DEffect 0.00 2.00
+ EFFECT + GaussianBlurEffect 0.00 2.00
+ EFFECT + CNNEffect 0.0 2.0 layers=3 blend=.9
+# EFFECT + ChromaAberrationEffect 0.00 1.50 offset=0.01 angle=1.57
+
+SEQUENCE 10.50 0 "CNN effect"
+ EFFECT + HeptagonEffect 0.0 12.00
+# EFFECT + RotatingCubeEffect 0.00 12.0
+# EFFECT + Hybrid3DEffect 0.00 12.00
+ EFFECT + Scene1Effect 0.0 12.0
+ EFFECT + CNNEffect 1.0 12.0 layers=3 blend=.5
+
+SEQUENCE 22.0 0 "buggy"
+ EFFECT + HeptagonEffect 0.00 0.20
+ EFFECT + FadeEffect 0.11 1.01
+
+SEQUENCE 22.14 3
+ EFFECT + ThemeModulationEffect 0.00 4.00
+ EFFECT = HeptagonEffect 0.00 4.00
+ EFFECT + GaussianBlurEffect 0.00 5.00 strength=1.5
+ EFFECT + ChromaAberrationEffect 0.00 5.00 offset=0.03 angle=0.785
+ EFFECT + SolarizeEffect 0.00 5.00
+
+SEQUENCE 23.00 2
+ EFFECT - FlashCubeEffect 0.20 1.50
+ EFFECT + HeptagonEffect 0.00 2.00
+ EFFECT + ParticleSprayEffect 0.00 2.00
+ EFFECT + ParticlesEffect 0.00 2.00
+
+SEQUENCE 22.75 2 "Fade"
+ EFFECT - FlashCubeEffect 0.20 1.50
+ EFFECT + FlashEffect 0.00 1.00
+
+SEQUENCE 23.88 10
+ EFFECT - FlashCubeEffect 0.20 1.50
+ EFFECT + GaussianBlurEffect 0.00 2.00
+ EFFECT + FlashEffect 0.00 0.20
+ EFFECT = FlashEffect 0.50 0.20
+
+SEQUENCE 25.59 1
+ EFFECT + ThemeModulationEffect 0.00 8.00
+ EFFECT + HeptagonEffect 0.20 2.00
+ EFFECT + ParticleSprayEffect 0.00 8.00
+ EFFECT + Hybrid3DEffect 0.00 8.06
+ EFFECT + GaussianBlurEffect 0.00 8.00
+ EFFECT + ChromaAberrationEffect 0.00 8.14
+ EFFECT + SolarizeEffect 0.00 7.88
+
+SEQUENCE 33.08 0
+ EFFECT + ThemeModulationEffect 0.00 3.00
+ EFFECT + VignetteEffect 0.00 3.00 radius=0.6 softness=0.3
+ EFFECT + SolarizeEffect 0.00 3.00
+
+SEQUENCE 35.31 0
+ EFFECT + ThemeModulationEffect 0.00 4.00
+ EFFECT + HeptagonEffect 0.20 2.00
+ EFFECT + GaussianBlurEffect 0.00 8.00
+ EFFECT + SolarizeEffect 0.00 2.00
+
+SEQUENCE 42.29 0
+ EFFECT + ThemeModulationEffect 0.00 6.00
+ EFFECT = HeptagonEffect 0.20 2.00
+ EFFECT + Hybrid3DEffect 0.00 4.00
+ EFFECT + ParticleSprayEffect 0.00 5.50
+ EFFECT + HeptagonEffect 0.00 8.00
+ EFFECT + ChromaAberrationEffect 0.00 7.50
+ EFFECT + GaussianBlurEffect 0.00 8.00
+
+SEQUENCE 50.02 0
+ EFFECT + ThemeModulationEffect 0.00 4.00
+ EFFECT + HeptagonEffect 0.00 9.50
+ EFFECT + ChromaAberrationEffect 0.00 9.00
+ EFFECT + GaussianBlurEffect 0.00 8.00
+