49f62d02cb
The SDK's tool, in horizon-shader-api: `horizon-shader new <dir> --template post|sky|material` makes a pack that passes the check, `check <pack>... [--json]` runs the check the game, the launcher and the registry run and prints each stage's cost and the pack's SHA-256 or every problem at its file:line:column, and `pack <dir>` checks then writes the reproducible .hshader. Golden Hour, the example pack, warms the sky around a low sun and adds a soft glow and a colour grade, with five options. docs/shaders.md is the authors' guide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
10 lines
418 B
WebGPU Shading Language
10 lines
418 B
WebGPU Shading Language
// Runs once per pixel of the world's picture, under the hand and the HUD.
|
|
// Reference: docs/api/shaders-reference.md (the inputs, `frame` and the helpers).
|
|
override saturation: f32 = 1.15;
|
|
|
|
fn post(input: PostInput) -> vec4<f32> {
|
|
let grey = dot(input.color.rgb, vec3<f32>(0.2126, 0.7152, 0.0722));
|
|
let color = mix(vec3<f32>(grey), input.color.rgb, saturation);
|
|
return vec4<f32>(color, input.color.a);
|
|
}
|