#creative-coding #shaders #sounds #tool #file

bin+lib kchfgt

Creative coding tool with shaders and sounds

3 releases (breaking)

new 0.3.0 Feb 18, 2025
0.2.0 Jan 21, 2025
0.1.0 Jan 17, 2025

#447 in Graphics APIs

Download history 197/week @ 2025-01-16 19/week @ 2025-01-23 1/week @ 2025-01-30 5/week @ 2025-02-06

222 downloads per month

MIT license

27KB
615 lines

KaCHoFuGeTsu

kchfgt ("花鳥風月", which means beauties of nature) is a creative coding tool with shaders and sounds.

It's still under development.

Usage

Creative coding tool with shaders and sounds

Usage: kchfgt [OPTIONS] <FILE>

Arguments:
  <FILE>  Input configuration file

Options:
  -h, --help             Print help
  -V, --version          Print version

Config file format

[window]
width = <Window width>
height = <Window height>

[[pipeline]]
shader_type = "fragment"
label = <Label of the shader>
entry_point = <Entry point of the shader>
file = <Path to the shader (wgsl) file>

Fragment shaders

The following uniforms are available

struct WindowUniform {
    // window size in physical size
    resolution: vec2<f32>,
};

struct TimeUniform {
    // time elapsed since the program started
    duration: f32,
};

struct MouseUniform {
    // mouse position in physical size
    position: vec2<f32>,
};

@group(0) @binding(0) var<uniform> window: WindowUniform;
@group(0) @binding(1) var<uniform> time: TimeUniform;
@group(1) @binding(0) var<uniform> mouse: MouseUniform;

struct VertexOutput {
    @builtin(position) position: vec4<f32>,
};

@fragment
fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
    // Your shader codes here
}

Dependencies

~9–45MB
~717K SLoC