98c8db50a3
A new crate, horizon-shader-api, reads and checks Horizon's own WGSL shader packs (docs/api/shaders.md), so the game, the launcher and the registry judge a pack the same way. This first part is the format: the manifest (id, name, version, the api line, shared files, the sky, material and post stages, options typed for WGSL override constants, a GPU time budget) and the package (a folder or a .hshader zip, built reproducibly so its SHA-256 depends only on its files). The stages' WGSL is checked in the next parts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 lines
92 B
WebGPU Shading Language
4 lines
92 B
WebGPU Shading Language
fn luminance(c: vec3<f32>) -> f32 {
|
|
return dot(c, vec3<f32>(0.2126, 0.7152, 0.0722));
|
|
}
|