Remove shader packs

A developer of Iris showed that Horizon's shader pack code was written from
Iris's source. This removes it: the horizon-shaderpack crate, Java pack
loading and its render stages, Horizon's own WGSL packs and the example
packs, the Shader Packs screen and its option, the launcher's shader pack
browsing and installing, and the docs about them. Shader packs may come
back later as a clean-room rewrite.

The vanilla renderer and its post-processing (resolution scale, FXAA) are
unchanged. Options files that name a pack load and drop the key; the
launcher reads manifests that list a shader pack, and files in
`shaderpacks/` are never deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-24 16:15:39 +02:00
parent 535f2d2a04
commit 4e7c25bb55
123 changed files with 291 additions and 19190 deletions
+15 -4
View File
@@ -1,9 +1,9 @@
//! What the browser installed into the game folder, and installing, updating and removing it.
//!
//! `mod-browser.json` beside `options.txt` lists each file the browser put in `resourcepacks/`
//! or `shaderpacks/`, and each Java mod it ported into `horizon-mods/`: where it came from, its
//! version and its checksum. Files the player put
//! there themselves are never touched: the browser only replaces or removes what it lists.
//! `mod-browser.json` beside `options.txt` lists each file the browser put in `resourcepacks/`,
//! and each Java mod it ported into `horizon-mods/`: where it came from, its version and its
//! checksum. Files the player put there themselves are never touched: the browser only replaces
//! or removes what it lists.
use super::{pick, safe_name, Kind, Project, Source, SourceId, Support, Version};
use serde::{Deserialize, Serialize};
use std::fs;
@@ -43,9 +43,20 @@ pub struct Entry {
#[derive(Debug, Default, Serialize, Deserialize)]
pub struct Installed {
/// An entry this launcher can't read (a shader pack, which older launchers installed) is
/// left out, and its file left where it is.
#[serde(deserialize_with = "readable_entries")]
pub entries: Vec<Entry>,
}
fn readable_entries<'de, D: serde::Deserializer<'de>>(d: D) -> Result<Vec<Entry>, D::Error> {
let entries = Vec::<serde_json::Value>::deserialize(d)?;
Ok(entries
.into_iter()
.filter_map(|e| serde_json::from_value(e).ok())
.collect())
}
impl Installed {
pub fn load(home: &Path) -> Self {
fs::read_to_string(home.join(MANIFEST))