diff options
| author | skal <pascal.massimino@gmail.com> | 2026-01-28 22:17:08 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-01-28 22:17:08 +0100 |
| commit | 84e484645ff70d3a63f11ae0d23727c65a8d5c71 (patch) | |
| tree | 79f6d66c281b263775a55730077bf7de33a6bf36 | |
| parent | db86bc803fb00c8efdfa0c532def3bdd4e60751c (diff) | |
remove shader.wgsl
| -rw-r--r-- | src/gpu/gpu.cc | 2 | ||||
| -rw-r--r-- | src/gpu/shader.wgsl | 35 |
2 files changed, 1 insertions, 36 deletions
diff --git a/src/gpu/gpu.cc b/src/gpu/gpu.cc index f374908..4d110e7 100644 --- a/src/gpu/gpu.cc +++ b/src/gpu/gpu.cc @@ -136,7 +136,7 @@ fn fs_main() -> @location(0) vec4<f32> { // Dynamic color shifting based on time and responsiveness to peak let h = uniforms.time * 2.0 + uniforms.audio_peak * 3.0; let r = sin(h + 0.0) * 0.5 + 0.5; - let g = sin(h + 2.0) * 0.5 + 0.5; + let g = sin(h + 2.0) * 0.9 + 0.3; let b = sin(h + 4.0) * 0.5 + 0.5; // Add brightness boost on peak diff --git a/src/gpu/shader.wgsl b/src/gpu/shader.wgsl deleted file mode 100644 index f481466..0000000 --- a/src/gpu/shader.wgsl +++ /dev/null @@ -1,35 +0,0 @@ -struct Uniforms { - audio_peak : f32, -}; - -@group(0) @binding(0) var<uniform> uniforms : Uniforms; - -@vertex -fn vs_main(@builtin(vertex_index) vertex_index: u32) -> @builtin(position) vec4<f32> { - let num_sides = 7.0; - let angle = f32(vertex_index) * 2.0 * PI / num_sides; - - // Base size and pulsating scale based on audio peak - let base_scale = 0.5; - let pulse_scale = 0.2 * uniforms.audio_peak; - let scale = base_scale + pulse_scale; - - // Vertices for a heptagon (fan from center) - if (vertex_index == 0) { return vec4<f32>(0.0, 0.0, 0.0, 1.0); } // Center - else { // Subsequent points connect to the center and previous point - let angle = f32(vertex_index) * 2.0 * PI / num_sides; - let x = scale * cos(angle); - let y = scale * sin(angle); - return vec4<f32>(x, y, 0.0, 1.0); - } -} - -@fragment -fn fs_main() -> @location(0) vec4<f32> { - // Simple color, maybe with a hue shift based on audio peak - let hue = uniforms.audio_peak * 0.5; // Adjust as needed for desired color range - let r = sin(hue + 0.0) * 0.5 + 0.5; - let g = sin(hue + 2.0) * 0.5 + 0.5; - let b = sin(hue + 4.0) * 0.5 + 0.5; - return vec4<f32>(r, g, b, 1.0); -}
\ No newline at end of file |
