Files
horizon-airdef/crates/horizon-shader-api/templates/material/material.wgsl
T
Ludovic Marie 49f62d02cb Horizon shader packs: horizon-shader new/check/pack, templates, an example pack and the guide
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>
2026-10-25 15:38:23 +01:00

10 lines
390 B
WebGPU Shading Language

// The colour of each point of a block's surface, before the alpha test and
// fog. Vanilla's own: albedo * tint * vec4(lightmap, 1.0).
// Reference: docs/api/shaders-reference.md.
override contrast: f32 = 1.2;
fn material(input: MaterialInput) -> Surface {
let light = pow(input.lightmap, vec3<f32>(contrast));
return Surface(input.albedo * input.tint * vec4<f32>(light, 1.0));
}