98ebdcad7b
The legaliser of docs/shader-packs.md step 1, on a syntax tree (glsl-lang) instead of the spike's tokens: attribute/varying to located in/out with matrix and array varyings split, loose uniforms in one std140 block that extends across a pass, combined samplers split into texture + sampler bindings (through function parameters, respecting locals that hide them), compatibility built-ins and Iris's core-profile names declared, legacy texture and shadow calls, hoisted global initialisers, sized unsized arrays, isnan/isinf/modf helpers, and dead code after a jump dropped (the spike's 'naga constructor bug' in BSL was code after discard). naga then parses, validates and writes WGSL. The programs of one pass share a Link so locations, bindings and the uniform layout agree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
624 B
TOML
21 lines
624 B
TOML
[package]
|
|
name = "horizon-shaderpack"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
description = "Java (OptiFine/Iris) shader packs for Horizon: Iris's preprocessor and the GLSL to WGSL translation"
|
|
|
|
[dependencies]
|
|
glsl-lang = "0.8.1"
|
|
naga = { version = "30.0.1", features = ["glsl-in", "wgsl-in", "wgsl-out"] }
|
|
# The C preprocessor naga's GLSL front end uses.
|
|
pp-rs = "0.2.1"
|
|
zip = { version = "2", default-features = false, features = ["deflate"] }
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dev-dependencies]
|
|
zip = { version = "2", default-features = false, features = ["deflate"] }
|