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
411 B
WebGPU Shading Language
10 lines
411 B
WebGPU Shading Language
// The sky's colour along each view ray; the sun, moon, stars and clouds are
|
|
// drawn over it. Reference: docs/api/shaders-reference.md.
|
|
override glow: f32 = 0.5;
|
|
|
|
fn sky(input: SkyInput) -> vec4<f32> {
|
|
let toward_sun = max(dot(input.direction, frame.sun_direction), 0.0);
|
|
let warm = vec3<f32>(1.0, 0.6, 0.3) * pow(toward_sun, 8.0) * glow;
|
|
return vec4<f32>(input.color.rgb + warm, input.color.a);
|
|
}
|