summaryrefslogtreecommitdiff
path: root/common/shaders/combined_postprocess.wgsl
blob: bf43d6e40c47f6473e8cd1a4f62f991249260b93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Example: Combined post-process using inline functions
// Demonstrates how to chain multiple simple effects without separate classes

#include "sequence_uniforms"
#include "postprocess_inline"
#include "render/fullscreen_uv_vs"  // <- VertexOutput + vs_main

@group(0) @binding(0) var input_sampler: sampler;
@group(0) @binding(1) var input_texture: texture_2d<f32>;
@group(0) @binding(2) var<uniform> uniforms: UniformsSequenceParams;

@fragment fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
    // Sample base color
    var color = textureSample(input_texture, input_sampler, in.uv);
    
    // Apply effects in sequence (customize as needed)
    // color = apply_solarize(color, 0.4, 0.4, uniforms.time);
    // color = apply_theme(color, vec3f(1.0, 0.8, 0.6), 0.3);
    color = apply_vignette(color, in.uv, 0.6, 0.1, uniforms.audio_intensity);
    // color = apply_flash(color, uniforms.beat_phase * 0.2);
    
    return color;
}