Merge upstream main into launcher accounts

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
martipopsandClaude Opus 5.5 committed 2026-11-03 16:44:02 -05:00
commit ef242dfe34
297 files changed
+20457 -1413

No files matched your search

+2 -2
View File
@@ -9,9 +9,9 @@ permissions:
actions: write
jobs:
cancel:
# One of playhorizon's small runners, out of GitHub's shared pool: no checkout, no code of the pull request
# One of our small runners (horizon-light), out of GitHub's pool: no checkout, no code of the pull request
# (docs/ci-runners.md). SELF_HOSTED_CI=off: GitHub's runners.
runs-on: ${{ vars.SELF_HOSTED_CI != 'off' && fromJSON('["self-hosted", "linux", "playhorizon-light"]') || 'ubuntu-latest' }}
runs-on: ${{ vars.SELF_HOSTED_CI != 'off' && fromJSON('["self-hosted", "linux", "horizon-light"]') || 'ubuntu-latest' }}
steps:
- name: Cancel the pull request's unfinished runs
env:
+28 -9
View File
@@ -27,13 +27,18 @@ jobs:
# One job, not one per check: each job takes a runner from the organisation's shared pool, and with every pull request
# and every merge to main starting this workflow, three jobs a run left the pool's queue tens of minutes deep.
#
# Where: GitHub's runners. With the repository variable SELF_HOSTED_CI=all (for when that pool is full: their 4 CPUs
# are about one GitHub runner, docs/ci-runners.md), main's pushes and this repository's own pull requests run on
# playhorizon's checks runners (label playhorizon-ci); a fork's pull request never does (and the runners refuse it
# themselves). There the build folder persists (CARGO_TARGET_DIR, outside the checkout), so the apt packages,
# Python and the Rust cache steps are GitHub's only.
# Where (docs/ci-runners.md): our checks runners (label horizon-checks: the desktop's, an isolated user, so a fork's
# pull request runs there too) take the pull requests whose number ends in 0 or 1, about what their three runners
# can do; GitHub's runners take the others and main's pushes (which also save the Rust cache GitHub's pull request
# runs read), so both pools work at once. The repository variable SELF_HOSTED_CI moves them: `all` every job to
# ours, `light` (the desktop paused) or `off` every job to GitHub's. On ours the build folder persists
# (CARGO_TARGET_DIR, outside the checkout), so the apt packages, Python and the Rust cache steps are GitHub's only.
verify:
runs-on: ${{ vars.SELF_HOSTED_CI == 'all' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && fromJSON('["self-hosted", "linux", "playhorizon-ci"]') || 'ubuntu-latest' }}
runs-on: >-
${{ vars.SELF_HOSTED_CI != 'off' && vars.SELF_HOSTED_CI != 'light' && (vars.SELF_HOSTED_CI == 'all' ||
github.event_name == 'pull_request' && (endsWith(format('{0}', github.event.pull_request.number), '0') ||
endsWith(format('{0}', github.event.pull_request.number), '1'))) &&
fromJSON('["self-hosted", "linux", "horizon-checks"]') || 'ubuntu-latest' }}
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
@@ -63,6 +68,16 @@ jobs:
else
python tools/check_public_tree.py --history
fi
# Our runners as GitHub's: some Python tests compile Rust with a bare `rustc` (GitHub's image has a default
# toolchain, our runners' own rustup homes may not), and the GPU tests find no adapter there, so they return
# early. Ours have Mesa's software Vulkan for parity; a backend Linux lacks keeps the tests from it, so a pull
# request's verify doesn't depend on which pool took it (#8627: a GPU test that flakes on lavapipe).
- name: Our runners as GitHub's (a default Rust toolchain, no GPU)
if: runner.environment != 'github-hosted'
run: |
rustup toolchain install stable --profile minimal --component rustfmt --component clippy
rustup default stable
echo "WGPU_BACKEND=dx12" >> "$GITHUB_ENV"
- name: Test offline research tooling
run: python -m unittest discover -s tests -v
- name: Install Rust toolchain and the ALSA and udev headers the client links against
@@ -104,7 +119,11 @@ jobs:
# changes it or a crate it builds is checked here, and so is every push to main: two pull requests can each pass
# alone and break it together (#2059 and the registry ratings did, 2026-10-26).
launcher:
runs-on: ${{ vars.SELF_HOSTED_CI == 'all' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && fromJSON('["self-hosted", "linux", "playhorizon-ci"]') || 'ubuntu-latest' }}
runs-on: >-
${{ vars.SELF_HOSTED_CI != 'off' && vars.SELF_HOSTED_CI != 'light' && (vars.SELF_HOSTED_CI == 'all' ||
github.event_name == 'pull_request' && (endsWith(format('{0}', github.event.pull_request.number), '0') ||
endsWith(format('{0}', github.event.pull_request.number), '1'))) &&
fromJSON('["self-hosted", "linux", "horizon-checks"]') || 'ubuntu-latest' }}
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
@@ -145,8 +164,8 @@ jobs:
# a harness, an oracle, a probe or the runner, or carries the run-parity label (run-parity.yml, when it is added).
parity-scope:
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
# A git diff of this repository's own branch: one of playhorizon's small runners (docs/ci-runners.md).
runs-on: ${{ vars.SELF_HOSTED_CI != 'off' && fromJSON('["self-hosted", "linux", "playhorizon-light"]') || 'ubuntu-latest' }}
# A git diff of this repository's own branch: one of our small runners (horizon-light, docs/ci-runners.md).
runs-on: ${{ vars.SELF_HOSTED_CI != 'off' && fromJSON('["self-hosted", "linux", "horizon-light"]') || 'ubuntu-latest' }}
outputs:
run: ${{ steps.scope.outputs.run }}
steps:
+4 -4
View File
@@ -29,8 +29,8 @@ jobs:
# the skipped runs of ordinary comments must not cancel a waiting one.
concurrency:
group: claim-${{ github.event.issue.number }}
# One of playhorizon's small runners, out of GitHub's shared pool: main's script only (docs/ci-runners.md).
runs-on: ${{ vars.SELF_HOSTED_CI != 'off' && fromJSON('["self-hosted", "linux", "playhorizon-light"]') || 'ubuntu-latest' }}
# One of our small runners (horizon-light), out of GitHub's pool: main's script only (docs/ci-runners.md).
runs-on: ${{ vars.SELF_HOSTED_CI != 'off' && fromJSON('["self-hosted", "linux", "horizon-light"]') || 'ubuntu-latest' }}
timeout-minutes: 5
permissions:
contents: read
@@ -56,8 +56,8 @@ jobs:
run: python3 tools/ci/claim_command.py command
release:
if: github.event_name != 'issue_comment' && github.repository == 'horizon-rust/horizon'
# One of playhorizon's small runners, out of GitHub's shared pool: main's script only (docs/ci-runners.md).
runs-on: ${{ vars.SELF_HOSTED_CI != 'off' && fromJSON('["self-hosted", "linux", "playhorizon-light"]') || 'ubuntu-latest' }}
# One of our small runners (horizon-light), out of GitHub's pool: main's script only (docs/ci-runners.md).
runs-on: ${{ vars.SELF_HOSTED_CI != 'off' && fromJSON('["self-hosted", "linux", "horizon-light"]') || 'ubuntu-latest' }}
timeout-minutes: 10
permissions:
contents: read
+4 -1
View File
@@ -17,7 +17,8 @@ permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
# Our checks runners (label horizon-checks, docs/ci-runners.md); SELF_HOSTED_CI=light or off: GitHub's.
runs-on: ${{ vars.SELF_HOSTED_CI != 'off' && vars.SELF_HOSTED_CI != 'light' && fromJSON('["self-hosted", "linux", "horizon-checks"]') || 'ubuntu-latest' }}
timeout-minutes: 20
defaults:
run:
@@ -25,7 +26,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install stable --profile minimal --component rustfmt --component clippy
# Ours keep their build folder between jobs.
- uses: Swatinem/rust-cache@v2
if: runner.environment == 'github-hosted'
with:
workspaces: crates/horizon-mod-registry
save-if: ${{ github.ref == 'refs/heads/main' }}
+2 -1
View File
@@ -21,7 +21,8 @@ concurrency:
jobs:
check:
runs-on: ubuntu-latest
# One of our small runners (label horizon-light, docs/ci-runners.md): main's script, Mojang's public manifest.
runs-on: ${{ vars.SELF_HOSTED_CI != 'off' && fromJSON('["self-hosted", "linux", "horizon-light"]') || 'ubuntu-latest' }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
+2 -1
View File
@@ -253,7 +253,8 @@ jobs:
# Tells the thread that asked for this build how it ended. A conflict `pick` already explained there.
needs: [pick, build, sign, publish]
if: always() && inputs.issue != '' && needs.pick.result == 'success'
runs-on: ubuntu-latest
# One comment, no checkout and no secret: one of our small runners (label horizon-light, docs/ci-runners.md).
runs-on: ${{ vars.SELF_HOSTED_CI != 'off' && fromJSON('["self-hosted", "linux", "horizon-light"]') || 'ubuntu-latest' }}
timeout-minutes: 5
permissions:
issues: write
+2 -2
View File
@@ -19,9 +19,9 @@ jobs:
concurrency:
group: overlap-note-${{ github.event.pull_request.number }}
cancel-in-progress: true
# One of playhorizon's small runners, out of GitHub's shared pool: it runs main's script only (above), so a fork's
# One of our small runners (horizon-light), out of GitHub's pool: it runs main's script only (above), so a fork's
# pull request runs none of its code there (docs/ci-runners.md). SELF_HOSTED_CI=off: GitHub's runners.
runs-on: ${{ vars.SELF_HOSTED_CI != 'off' && fromJSON('["self-hosted", "linux", "playhorizon-light"]') || 'ubuntu-latest' }}
runs-on: ${{ vars.SELF_HOSTED_CI != 'off' && fromJSON('["self-hosted", "linux", "horizon-light"]') || 'ubuntu-latest' }}
timeout-minutes: 10
permissions:
contents: read
+14 -3
View File
@@ -22,17 +22,24 @@ env:
jobs:
bench:
runs-on: ubuntu-latest
# Our checks runners (label horizon-checks, docs/ci-runners.md): the branch and the base on the same machine, as
# the comparison needs. SELF_HOSTED_CI=light or off: GitHub's.
runs-on: ${{ vars.SELF_HOSTED_CI != 'off' && vars.SELF_HOSTED_CI != 'light' && fromJSON('["self-hosted", "linux", "horizon-checks"]') || 'ubuntu-latest' }}
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust and the ALSA and udev headers
env:
HOSTED: ${{ runner.environment == 'github-hosted' }}
run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends libasound2-dev libudev-dev
if [ "$HOSTED" = true ]; then
sudo apt-get update && sudo apt-get install -y --no-install-recommends libasound2-dev libudev-dev
fi
rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
if: runner.environment == 'github-hosted'
with:
shared-key: pack-bench
- name: Bench the branch
@@ -46,11 +53,15 @@ jobs:
SCALE: ${{ inputs.scale || '1' }}
run: |
git fetch https://github.com/horizon-rust/horizon.git "$BASE"
# Our runners keep the folder beside the checkout between jobs.
git worktree remove --force ../base 2> /dev/null || rm -rf ../base
git worktree prune
git worktree add ../base FETCH_HEAD
cp crates/horizon-client-render/examples/pack_load_bench.rs ../base/crates/horizon-client-render/examples/
# A bench row that times a function the base lacks keeps it from building there: then
# the branch's own rows compare the two ways.
(cd ../base && CARGO_TARGET_DIR="$GITHUB_WORKSPACE/target" cargo run --profile fast -p horizon-client-render \
target=${CARGO_TARGET_DIR:-$GITHUB_WORKSPACE/target}
(cd ../base && CARGO_TARGET_DIR="$target" cargo run --profile fast -p horizon-client-render \
--example pack_load_bench -- --scale "$SCALE") > base.md \
|| echo "The bench does not build on the base." > base.md
- name: Summary
+2 -2
View File
@@ -16,9 +16,9 @@ jobs:
label:
# Title-only edits change nothing: skip them before a runner starts.
if: github.event.action != 'edited' || github.event.changes.body != null
# One of playhorizon's small runners, out of GitHub's shared pool: it runs main's script only (above), so a fork's
# One of our small runners (horizon-light), out of GitHub's pool: it runs main's script only (above), so a fork's
# pull request runs none of its code there (docs/ci-runners.md). SELF_HOSTED_CI=off: GitHub's runners.
runs-on: ${{ vars.SELF_HOSTED_CI != 'off' && fromJSON('["self-hosted", "linux", "playhorizon-light"]') || 'ubuntu-latest' }}
runs-on: ${{ vars.SELF_HOSTED_CI != 'off' && fromJSON('["self-hosted", "linux", "horizon-light"]') || 'ubuntu-latest' }}
timeout-minutes: 5
permissions:
contents: read
+4 -1
View File
@@ -17,7 +17,8 @@ permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
# Our checks runners (label horizon-checks, docs/ci-runners.md); SELF_HOSTED_CI=light or off: GitHub's.
runs-on: ${{ vars.SELF_HOSTED_CI != 'off' && vars.SELF_HOSTED_CI != 'light' && fromJSON('["self-hosted", "linux", "horizon-checks"]') || 'ubuntu-latest' }}
timeout-minutes: 20
defaults:
run:
@@ -25,7 +26,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install stable --profile minimal --component rustfmt --component clippy
# Ours keep their build folder between jobs.
- uses: Swatinem/rust-cache@v2
if: runner.environment == 'github-hosted'
with:
workspaces: crates/horizon-telemetry-server
save-if: ${{ github.ref == 'refs/heads/main' }}
+2 -1
View File
@@ -21,7 +21,8 @@ jobs:
startsWith(github.event.comment.body, '/reopen') ||
startsWith(github.event.comment.body, '/label') ||
startsWith(github.event.comment.body, '/unlabel'))
runs-on: ubuntu-latest
# One of our small runners (label horizon-light, docs/ci-runners.md): main's script only, as above.
runs-on: ${{ vars.SELF_HOSTED_CI != 'off' && fromJSON('["self-hosted", "linux", "horizon-light"]') || 'ubuntu-latest' }}
timeout-minutes: 5
permissions:
contents: read
+3
View File
@@ -14,6 +14,9 @@ Apache-2.0; both licenses are in that folder (`LICENSE.MIT`, `LICENSE.APACHE`).
fixes to its GLSL frontend that shader packs need, each applied in the commit that needed it. It is licensed under MIT or Apache-2.0; both licenses
are in that folder (`LICENSE.MIT`, `LICENSE.APACHE`).
The GLSL frontend also resets the common type for each comma-separated declarator so one
variable's array specifier does not change later variables.
## libmimalloc-sys and mimalloc
`third_party/libmimalloc-sys` is [libmimalloc-sys](https://github.com/purpleprotocol/mimalloc_rust)
@@ -0,0 +1,27 @@
# Particle culling review measurements — 2026-11-02
Ordinary-scene captures and measurements for PR #7054. The scene contains 24 mobs, about 9,400–10,100 rain particles, and about 50–100 campfire smoke particles. Two opposite-order passes were run with 2 s warmup and 8 s measurement per condition. Host: Intel Core i7-3770S, Intel HD Graphics 4000, Vulkan/Mesa, 675×727, render distance 4, VSync off, 260 FPS cap.
These are means of the two samples. CPU is the harness's average CPU time per frame; p99 is frame time. The normal scene is not expected to show large gains because most particles are visible.
| Condition | FPS | CPU ms/frame | Frame p99 ms |
| --- | ---: | ---: | ---: |
| Main, culling Off | 88.39 | 1.930 | 23.85 |
| Particle branch, culling Off | 88.55 | 1.828 | 24.88 |
| Main, Entity Culling Synchronous | 89.12 | 1.887 | 23.07 |
| Particle branch, Entity Culling Synchronous, Particle Culling Off | 89.06 | 1.897 | 25.18 |
| Particle Culling Synchronous | 88.87 | 1.774 | 24.94 |
| Particle Culling Asynchronous* | 89.00 | 1.754 | 24.90 |
*The asynchronous samples predate the final switch to a dedicated particle worker. They are retained only as historical context and are not a measurement of the final worker implementation. No FPS improvement is claimed from these ordinary-scene runs. The Off path delegates directly to `render`; `disabled_culled_render_matches_the_regular_particle_path` checks that it produces the same vertices.
The FPS and CPU differences are within run-to-run variability for this GPU-limited scene. The first four conditions are the reviewer's requested Main-versus-branch default and existing synchronous-mode comparisons. Particle Sync/Async rows are branch-internal mode comparisons.
## Captures
The screenshots show the same ordinary test world and FPS overlay:
- `main-off.png`
- `particle-off.png`
- `particle-sync.png`
- `particle-async.png`
Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 KiB

+30
View File
@@ -130,6 +130,36 @@ impl ResourceSource for Bundled {
"assets/horizon/lang/lt_lt.json" => {
include_str!("../../horizon-client/assets/horizon/lang/lt_lt.json")
}
"assets/horizon/lang/it_it.json" => {
include_str!("../../horizon-client/assets/horizon/lang/it_it.json")
}
"assets/horizon/lang/nl_nl.json" => {
include_str!("../../horizon-client/assets/horizon/lang/nl_nl.json")
}
"assets/horizon/lang/vi_vn.json" => {
include_str!("../../horizon-client/assets/horizon/lang/vi_vn.json")
}
"assets/horizon/lang/th_th.json" => {
include_str!("../../horizon-client/assets/horizon/lang/th_th.json")
}
"assets/horizon/lang/ja_jp.json" => {
include_str!("../../horizon-client/assets/horizon/lang/ja_jp.json")
}
"assets/horizon/lang/ar_sa.json" => {
include_str!("../../horizon-client/assets/horizon/lang/ar_sa.json")
}
"assets/horizon/lang/pt_br.json" => {
include_str!("../../horizon-client/assets/horizon/lang/pt_br.json")
}
"assets/horizon/lang/cs_cz.json" => {
include_str!("../../horizon-client/assets/horizon/lang/cs_cz.json")
}
"assets/horizon/lang/sv_se.json" => {
include_str!("../../horizon-client/assets/horizon/lang/sv_se.json")
}
"assets/horizon/lang/el_gr.json" => {
include_str!("../../horizon-client/assets/horizon/lang/el_gr.json")
}
"assets/horizon/lang/de_de.json" | "assets/horizon/lang/de_at.json" => {
include_str!("../../horizon-client/assets/horizon/lang/de_de.json")
}
@@ -0,0 +1,826 @@
//! Draws a scene `horizon-ctl render-capture DIR` wrote, offscreen, from its camera, with the
//! real `Renderer`, and prints GPU and CPU milliseconds per frame and Horizon's own passes'
//! GPU times as JSON (docs/graphics.md, "Render capture and replay").
//! `cargo run --release -p horizon-client-render --example scene_replay -- DIR [--frames 300]
//! [--warmup 60] [--yaw-offsets 0,90,180,270] [--texture-filtering 0|1|2] [--anisotropy-bit N]
//! [--mipmaps N] [--lod-distance CHUNKS] [--render-distance CHUNKS] [--size WxH]
//! [--section-draws flat|indirect] [--section-cull on|off] [--section-sides on|off]
//! [--gpu-culling on|off] [--root RESOURCES] [--screenshot PNG]
//! [--world SAVE --leaf-culling MODE] [--memory on]`
//! `--screenshot` saves the first view's last frame, after the timed frames.
//! `--world` meshes the captured sections again from that save's region files
//! (blocks, biomes and saved light; `ao`, `biomeBlendRadius` and `cutoutLeaves`
//! from `./options.txt`) with `--leaf-culling` (default `off`), so a mesher
//! change can be measured on the captured view. A section whose 3x3 columns are
//! not all saved keeps its captured mesh.
//! `--memory on` adds the renderer's largest GPU resources and, on macOS, the process's
//! physical footprint by category (`footprint`), taken after the timed frames.
use horizon_client_render::{
assets::{Assets, RenderAssets},
biome::Biomes,
blocks::BlockFacts,
chunk::{BIOME_STRATEGY, Chunk, ColumnLayout, Light, block_strategy},
fast_hash::{FxHashMap, FxHashSet},
gfx::{
PreparedTextures, Renderer, ScreenshotRequest,
capture::{self, AtlasCheck, Scene},
panorama::Faces,
},
graphics::LeafCullingMode,
hud::HudBatch,
lod::TileKey,
mesher::{MeshScratch, MeshTables, Mesher, SectionMesh, packed},
models,
};
use horizon_core::{
biome::{BiomeZoom, obfuscate_seed},
paletted::PalettedContainer,
};
use horizon_world::{
chunk::BlockState,
nbt::{Limits, NamedTag, Tag},
region::RegionFile,
registry::BlockRegistry,
};
use serde_json::{Value, json};
use std::{
path::{Path, PathBuf},
sync::{
Arc,
atomic::{AtomicUsize, Ordering},
},
time::{Duration, Instant},
};
use winit::{
application::ApplicationHandler,
event::WindowEvent,
event_loop::{ActiveEventLoop, EventLoop},
window::{Window, WindowId},
};
// The game's allocator, so that `--memory`'s footprint is the game's: the system heap kept
// gigabytes of the meshes `--world` frees dirty.
#[global_allocator]
static ALLOCATOR: horizon_threads::Allocator = horizon_threads::ALLOCATOR;
#[derive(Default)]
struct Options {
dir: PathBuf,
frames: usize,
warmup: usize,
yaw_offsets: Vec<f32>,
root: Option<PathBuf>,
texture_filtering: Option<i32>,
anisotropy_bit: Option<i32>,
mipmaps: Option<u32>,
lod_distance: Option<u32>,
render_distance: Option<i32>,
size: Option<[u32; 2]>,
flat: Option<bool>,
cull: Option<bool>,
sides: Option<bool>,
gpu_culling: Option<bool>,
screenshot: Option<PathBuf>,
world: Option<PathBuf>,
leaf_culling: LeafCullingMode,
memory: bool,
}
fn on_off(value: &str) -> Result<bool, String> {
match value {
"on" | "flat" => Ok(true),
"off" | "indirect" => Ok(false),
other => Err(format!("expected on or off, got {other}")),
}
}
fn options() -> Result<Options, String> {
let mut o = Options {
frames: 300,
warmup: 60,
yaw_offsets: vec![0.0],
..Default::default()
};
let mut args = std::env::args().skip(1);
let mut dir = None;
while let Some(arg) = args.next() {
if !arg.starts_with("--") {
dir = Some(PathBuf::from(arg));
continue;
}
let value = args.next().ok_or(format!("{arg} needs a value"))?;
let number = |v: &str| v.parse::<i64>().map_err(|e| format!("{arg}: {e}"));
match arg.as_str() {
"--frames" => o.frames = number(&value)?.max(1) as usize,
"--warmup" => o.warmup = number(&value)?.max(0) as usize,
"--yaw-offsets" => {
o.yaw_offsets = value
.split(',')
.map(|v| v.trim().parse::<f32>().map_err(|e| format!("{arg}: {e}")))
.collect::<Result<_, _>>()?
}
"--root" => o.root = Some(value.into()),
"--texture-filtering" => o.texture_filtering = Some(number(&value)? as i32),
"--anisotropy-bit" => o.anisotropy_bit = Some(number(&value)? as i32),
"--mipmaps" => o.mipmaps = Some(number(&value)?.max(0) as u32),
"--lod-distance" => o.lod_distance = Some(number(&value)?.max(0) as u32),
"--render-distance" => o.render_distance = Some(number(&value)?.max(0) as i32),
"--size" => {
let (w, h) = value.split_once('x').ok_or("--size takes WxH")?;
o.size = Some([number(w)? as u32, number(h)? as u32]);
}
"--section-draws" => o.flat = Some(on_off(&value)?),
"--section-cull" => o.cull = Some(on_off(&value)?),
"--section-sides" => o.sides = Some(on_off(&value)?),
"--gpu-culling" => o.gpu_culling = Some(on_off(&value)?),
"--screenshot" => o.screenshot = Some(value.into()),
"--world" => o.world = Some(value.into()),
"--memory" => o.memory = on_off(&value)?,
"--leaf-culling" => {
o.leaf_culling = LeafCullingMode::ALL
.into_iter()
.find(|mode| mode.name() == value)
.ok_or(format!("no leaf culling mode {value}"))?;
}
other => return Err(format!("unknown option {other}")),
}
}
o.dir = dir.ok_or("the capture directory is required")?;
Ok(o)
}
/// Milliseconds: average, median, 95th percentile and slowest, over `samples`.
fn summary(samples: &[f32]) -> Value {
if samples.is_empty() {
return Value::Null;
}
let mut sorted = samples.to_vec();
sorted.sort_by(f32::total_cmp);
let at = |q: f32| sorted[((sorted.len() - 1) as f32 * q).round() as usize];
json!({
"avg": samples.iter().sum::<f32>() / samples.len() as f32,
"min": sorted[0],
"p10": at(0.1),
"p50": at(0.5),
"p95": at(0.95),
"max": sorted[sorted.len() - 1],
"samples": samples.len(),
})
}
fn ms(d: Duration) -> f32 {
d.as_secs_f32() * 1000.0
}
fn replay(window: Arc<Window>) -> Result<(), Box<dyn std::error::Error>> {
let o = options()?;
let scene = Scene::read(&o.dir)?;
let settings = &scene.settings;
let root = o.root.clone().unwrap_or_else(|| settings.resources.clone());
let loading = Instant::now();
let assets = Assets::load(&root)?;
let render = assets.reload(&root)?;
if AtlasCheck::of(&render) != settings.atlas {
return Err(format!(
"the block sprites at {} are not the ones the capture was made with (resource packs \
or mods?): pass --root with the game's resource root",
root.display()
)
.into());
}
let one = [255u8; 4];
let zero = [0u8; 4];
let prepared = PreparedTextures::new(
&render.pixels,
render.sprite_size,
render.texture_layers,
&render.sprite_mips,
(&zero[..], 1),
)
.with_pbr(
&render.pbr_normals,
&render.pbr_specular,
render.pbr_size,
render.texture_layers,
);
let mut renderer = pollster::block_on(Renderer::new(
window,
true,
&render.pixels,
render.sprite_size,
render.sprite_minimum_size,
render.texture_layers,
&render.sprite_mips,
&render.animations,
(&one[..], 1, 1),
(&zero[..], 1, 1),
(&zero[..], 1, 1),
(&zero[..], 1),
Arc::new(Faces::colour([0, 0, 0, 255])),
Some(prepared),
None,
settings.graphics_api(),
settings.translucent_batching,
false,
))?;
let state = &scene.renderer;
let [width, height] = o.size.unwrap_or(state.size);
renderer.resize(width, height);
renderer.gamma = state.gamma;
renderer.fullbright = state.fullbright;
renderer.improved_transparency = state.improved_transparency;
renderer.animated_textures = state.animated_textures;
let filtering = o.texture_filtering.unwrap_or(settings.texture_filtering);
let anisotropy = o.anisotropy_bit.unwrap_or(settings.anisotropy_bit);
renderer.set_texture_filtering(filtering, anisotropy);
renderer.set_mipmap_levels(o.mipmaps.unwrap_or(settings.mipmap_levels));
renderer.set_world_post(
settings.resolution_scale,
settings.fxaa,
settings.taa,
settings.upscale,
);
let mut notes = Vec::new();
let mut note = |what: &str, result: horizon_client_render::Result<()>| {
if let Err(e) = result {
notes.push(format!("{what}: {e}"));
}
};
note(
"section-draws",
renderer.set_flat_draws(o.flat.unwrap_or(state.flat_draws)),
);
note(
"section-cull",
renderer.set_section_cull(o.cull.unwrap_or(state.section_cull)),
);
note(
"gpu-culling",
renderer.set_gpu_culling(o.gpu_culling.unwrap_or(state.gpu_culling)),
);
renderer.set_section_sides(o.sides.unwrap_or(state.section_sides));
renderer.set_pass_timing(true);
let layout = ColumnLayout::of_level(state.min_y, state.sections as i32 * 16);
if layout != ColumnLayout::VANILLA {
renderer.clear_sections(layout);
}
// Near sections first: with no far tile resident yet, none fades in.
let camera = scene.frame.camera;
let column = |x: f64| (x.floor() as i32) >> 4;
let (cx, cz) = (column(camera[0]), column(camera[2]));
let near = |x: i32, z: i32| {
o.render_distance
.is_none_or(|r| (x - cx).pow(2) + (z - cz).pow(2) <= r * r)
};
let (mut remeshed, mut world_report) = (FxHashMap::default(), Value::Null);
if let Some(world) = &o.world {
let keys: Vec<[i32; 3]> = section_keys(&o.dir)?
.into_iter()
.filter(|&[x, _, z]| near(x, z))
.collect();
let started = Instant::now();
remeshed = remesh(world, &root, &assets, &render, o.leaf_culling, &keys)?;
world_report = json!({
"save": world.display().to_string(),
"leaf_culling": o.leaf_culling.name(),
"remeshed": remeshed.len(),
"kept": keys.len() - remeshed.len(),
"remesh_ms": ms(started.elapsed()),
});
}
let leaf_layers = leaf_layers(&render);
let (mut sections, mut quads, mut leaf_quads) = (0, 0usize, 0usize);
let mut packed_quads = 0usize;
capture::read_meshes(&o.dir, "sections", |[x, y, z], captured| {
if near(x, z) {
let mesh = remeshed.remove(&[x, y, z]).unwrap_or(captured);
quads += mesh.solid.len() / 4;
packed_quads += packed::packed_quads(&mesh.packed, mesh.solid.len() / 4);
leaf_quads += mesh
.solid
.iter()
.filter(|v| leaf_layers.contains(&v.layer))
.count()
/ 4;
renderer.upload((x, y, z), &mesh);
sections += 1;
}
})?;
let mut tiles: Vec<(TileKey, SectionMesh)> = Vec::new();
capture::read_meshes(&o.dir, "tiles", |[x, z, level], mesh| {
let key = TileKey {
x,
z,
level: level as u8,
};
let [ox, _, oz] = key.origin();
let half = f64::from(key.size()) / 2.0;
let (dx, dz) = (
f64::from(ox) + half - camera[0],
f64::from(oz) + half - camera[2],
);
let near = o
.lod_distance
.is_none_or(|d| (dx * dx + dz * dz).sqrt() <= f64::from(d) * 16.0);
if near {
tiles.push((key, mesh));
}
})?;
let tile_count = tiles.len();
if !tiles.is_empty() {
let cutout: FxHashSet<(i32, i32)> = scene.lod_cutout.iter().copied().collect();
renderer.queue_lods(tiles, Vec::new(), Some(cutout));
renderer.upload_lods(Duration::from_secs(3600));
}
let loaded_ms = ms(loading.elapsed());
let hud = HudBatch::new([width, height]);
let mut views = Vec::new();
for &offset in &o.yaw_offsets {
let mut frame = scene.frame(&hud);
frame.yaw += offset;
frame.eye_rotation[0] += offset;
if let Some(r) = o.render_distance {
frame.distance = (r * 16) as f32;
frame.detail_distance = frame.distance;
}
let draw = |renderer: &mut Renderer| -> horizon_client_render::Result<Duration> {
if frame.cave_culling {
renderer.start_occlusion(frame.camera, frame.distance);
}
let started = Instant::now();
renderer.render(&frame)?;
Ok(started.elapsed())
};
for _ in 0..o.warmup {
draw(&mut renderer)?;
}
renderer.gpu_times.clear();
let (mut call, mut encode, mut gpu) = (Vec::new(), Vec::new(), Vec::new());
for _ in 0..o.frames {
call.push(ms(draw(&mut renderer)?));
encode.push(ms(renderer.last_encode));
gpu.append(&mut renderer.gpu_times);
}
// Timestamps arrive a few frames late: a few more of the same frame bring them in.
for _ in 0..16 {
if gpu.len() >= o.frames {
break;
}
draw(&mut renderer)?;
gpu.append(&mut renderer.gpu_times);
}
gpu.truncate(o.frames);
if let Some(path) = o.screenshot.as_ref().filter(|_| views.is_empty()) {
renderer.screenshot_result = None;
renderer.screenshot = Some(ScreenshotRequest {
path: path.clone(),
size: None,
scaled: false,
});
for _ in 0..32 {
draw(&mut renderer)?;
if renderer.screenshot_result.is_some() {
break;
}
}
match renderer.screenshot_result.take() {
Some(Ok(_)) => {}
Some(Err(e)) => notes.push(format!("screenshot: {e}")),
None => notes.push("screenshot: not saved".into()),
}
}
views.push(json!({
"yaw_offset": offset,
"gpu_ms": summary(&gpu),
"render_call_ms": summary(&call),
"cpu_encode_ms": summary(&encode),
"gpu_passes_median_ms": renderer
.own_pass_times()
.into_iter()
.map(|(name, ms)| (name, json!(ms)))
.collect::<serde_json::Map<_, _>>(),
"drawn_sections": renderer.drawn_sections,
"section_draws": renderer.section_draws,
"section_draw_calls": renderer.section_draw_calls,
// Occlusion culling's last result: boxes hidden, boxes tested, share of solid
// indices hidden.
"culled": renderer.culled_sections(),
}));
}
let section_draws = if renderer.flat_draws() {
"flat"
} else {
"indirect"
};
let memory = o.memory.then(|| memory_report(&renderer));
let report = json!({
"capture": o.dir.display().to_string(),
"adapter": renderer.info.name,
"captured_on": state.adapter,
"size": [width, height],
"sections": sections,
"solid_quads": quads,
"leaf_quads": leaf_quads,
// Solid quads uploaded as one record each (`mesher::packed`).
"packed_quads": packed_quads,
"world": world_report,
"tiles": tile_count,
"load_ms": loaded_ms,
"frames": o.frames,
"warmup": o.warmup,
"settings": {
"texture_filtering": filtering,
"anisotropy_bit": anisotropy,
"mipmaps": o.mipmaps.unwrap_or(settings.mipmap_levels),
"lod_distance": o.lod_distance,
"render_distance": o.render_distance,
"section_draws": section_draws,
"section_cull": renderer.section_cull(),
"section_sides": renderer.section_sides(),
"gpu_culling": renderer.gpu_culling(),
"shader_pack_left_out": state.shader_pack,
},
"notes": notes,
"views": views,
"memory": memory,
});
println!("{}", serde_json::to_string_pretty(&report)?);
Ok(())
}
fn mb(bytes: u64) -> f64 {
(bytes as f64 / 1048576.0 * 10.0).round() / 10.0
}
/// `--memory`: the renderer's census in MiB and, on macOS, `footprint`'s summary of this
/// process (GPU buffers and textures count as IOAccelerator memory there).
fn memory_report(renderer: &Renderer) -> Value {
let gpu: serde_json::Map<String, Value> = renderer
.gpu_census()
.into_iter()
.map(|(name, bytes)| (format!("{name}_mb"), json!(mb(bytes))))
.collect();
let footprint = std::process::Command::new("/usr/bin/footprint")
.args(["-f", "bytes", "-p", &std::process::id().to_string()])
.output()
.ok()
.map(|out| String::from_utf8_lossy(&out.stdout).into_owned());
let footprint = footprint.map(|text| {
let mut total = None;
let mut categories = Vec::new();
for line in text.lines() {
if let Some(at) = line.find("Footprint: ") {
total = line[at + 11..]
.split_whitespace()
.next()
.and_then(|v| v.parse::<u64>().ok());
}
// " <dirty> B <clean> B <reclaimable> B <regions> <category>"
let words: Vec<&str> = line.split_whitespace().collect();
if words.len() >= 8
&& words[1] == "B"
&& let Ok(dirty) = words[0].parse::<u64>()
&& dirty >= 1 << 20
{
categories.push(json!([words[7..].join(" "), mb(dirty)]));
}
}
json!({ "total_mb": total.map(mb), "dirty_by_category_mb": categories })
});
json!({ "gpu": gpu, "footprint": footprint })
}
struct App;
impl ApplicationHandler for App {
fn resumed(&mut self, event_loop: &ActiveEventLoop) {
let window = Arc::new(
event_loop
.create_window(Window::default_attributes().with_visible(false))
.unwrap(),
);
if let Err(error) = replay(window) {
eprintln!("scene_replay: {error}");
std::process::exit(1);
}
event_loop.exit();
}
fn window_event(&mut self, _: &ActiveEventLoop, _: WindowId, _: WindowEvent) {}
}
fn main() {
EventLoop::new().unwrap().run_app(&mut App).unwrap();
}
/// The captured sections' keys, from the index alone.
fn section_keys(dir: &Path) -> Result<Vec<[i32; 3]>, Box<dyn std::error::Error>> {
#[derive(serde::Deserialize)]
struct Key {
key: [i32; 3],
}
let records: Vec<Key> = serde_json::from_reader(std::io::BufReader::new(std::fs::File::open(
dir.join("sections.json"),
)?))?;
Ok(records.into_iter().map(|r| r.key).collect())
}
/// Sprite layers of every leaves block, as terrain vertices carry them (with or
/// without `OPAQUE_LAYER`).
fn leaf_layers(render: &RenderAssets) -> FxHashSet<u16> {
render
.sprite_layers
.iter()
.filter(|(name, _)| name.ends_with("_leaves"))
.flat_map(|(_, &layer)| {
[
layer as u16,
layer as u16 | horizon_client_render::mesher::OPAQUE_LAYER,
]
})
.collect()
}
/// `--world`: the sections `keys` meshed again from `save`'s overworld region
/// files, on every core, as the game's workers mesh them.
fn remesh(
save: &Path,
root: &Path,
assets: &Assets,
render: &RenderAssets,
leaf_culling: LeafCullingMode,
keys: &[[i32; 3]],
) -> Result<FxHashMap<[i32; 3], SectionMesh>, Box<dyn std::error::Error>> {
let facts = BlockFacts::load(root, assets.registry)?;
let visibility = models::load_visibility(root, assets.registry)?;
let tables = MeshTables::new(assets, render, &facts, visibility)?;
let biomes = Biomes::load(root)?;
let seed = world_seed(save).unwrap_or_else(|| {
eprintln!(
"scene_replay: no seed in {}, biome blending uses 0",
save.display()
);
0
});
let options = std::fs::read_to_string("options.txt").unwrap_or_default();
let option = |key: &str| {
options
.lines()
.find_map(|l| l.strip_prefix(key)?.strip_prefix(':').map(str::to_owned))
};
let smooth_lighting = option("ao").is_none_or(|v| v == "true");
let cutout_leaves = option("cutoutLeaves").is_none_or(|v| v == "true");
let blend_radius = option("biomeBlendRadius")
.and_then(|v| v.parse().ok())
.unwrap_or(2);
let mut columns: Vec<(i32, i32)> = keys
.iter()
.flat_map(|&[x, _, z]| {
(-1..=1).flat_map(move |dz| (-1..=1).map(move |dx| (x + dx, z + dz)))
})
.collect();
columns.sort_unstable();
columns.dedup();
let threads = std::thread::available_parallelism().map_or(4, |n| n.get());
let region_dir = save.join("dimensions/minecraft/overworld/region");
let next = AtomicUsize::new(0);
let chunks: FxHashMap<(i32, i32), Chunk> = std::thread::scope(|scope| {
let workers: Vec<_> = (0..threads)
.map(|_| {
scope.spawn(|| {
let mut files: FxHashMap<(i32, i32), Option<RegionFile>> = FxHashMap::default();
let mut out = Vec::new();
loop {
let i = next.fetch_add(1, Ordering::Relaxed);
let Some(&(x, z)) = columns.get(i) else {
break;
};
let file = files.entry((x >> 5, z >> 5)).or_insert_with(|| {
RegionFile::open(region_dir.join(format!(
"r.{}.{}.mca",
x >> 5,
z >> 5
)))
.ok()
});
let root = file
.as_mut()
.and_then(|f| {
f.read(horizon_core::position::ChunkPos::new(x, z))
.ok()
.flatten()
})
.and_then(|record| record.nbt(Limits::default()).ok());
if let Some(chunk) =
root.and_then(|root| decode(&root, assets.registry, &biomes))
{
out.push(((x, z), chunk));
}
}
out
})
})
.collect();
workers
.into_iter()
.flat_map(|w| w.join().unwrap())
.collect()
});
let meshable: Vec<[i32; 3]> = keys
.iter()
.copied()
.filter(|&[x, _, z]| {
(-1..=1).all(|dz| (-1..=1).all(|dx| chunks.contains_key(&(x + dx, z + dz))))
})
.collect();
let next = AtomicUsize::new(0);
let meshes = std::thread::scope(|scope| {
let workers: Vec<_> = (0..threads)
.map(|_| {
scope.spawn(|| {
let mut mesher = Mesher {
nether_shading: false,
shader_pack_lighting: false,
separate_ao: false,
assets,
render,
tables: &tables,
biomes: &biomes,
visibility: tables.visibility.clone(),
zoom: BiomeZoom::new(obfuscate_seed(seed)),
blend_radius,
smooth_lighting,
cutout_leaves,
translucent_layers: &[],
leaf_culling,
};
let mut scratch = MeshScratch::default();
let mut out = Vec::new();
loop {
let i = next.fetch_add(1, Ordering::Relaxed);
let Some(&[x, y, z]) = meshable.get(i) else {
break;
};
let region: [[Option<&Chunk>; 3]; 3] = std::array::from_fn(|dz| {
std::array::from_fn(|dx| {
chunks.get(&(x + dx as i32 - 1, z + dz as i32 - 1))
})
});
let mut mesh =
mesher.mesh_reusing(&region, y, SectionMesh::default(), &mut scratch);
mesh.sort_solid();
out.push(([x, y, z], mesh));
}
out
})
})
.collect();
workers
.into_iter()
.flat_map(|w| w.join().unwrap())
.collect::<FxHashMap<_, _>>()
});
Ok(meshes)
}
/// The world seed: `data/minecraft/world_gen_settings.dat`, or level.dat's
/// `Data.WorldGenSettings` in older saves.
fn world_seed(save: &Path) -> Option<i64> {
let read = |path: PathBuf| {
horizon_world::datafix::files::read_dat(&path)
.ok()
.flatten()
};
let seed = |tag: Option<&Tag>| match tag?.get("seed")? {
Tag::Long(seed) => Some(*seed),
_ => None,
};
seed(
read(save.join("data/minecraft/world_gen_settings.dat"))
.as_ref()
.and_then(|t| t.get("data")),
)
.or_else(|| {
seed(
read(save.join("level.dat"))?
.get("Data")?
.get("WorldGenSettings"),
)
})
}
/// A saved full chunk's blocks, biomes and light, as the client's own save
/// loader reads them (`save::decode_lit`, in horizon-client).
fn decode(root: &NamedTag, registry: &BlockRegistry, biomes: &Biomes) -> Option<Chunk> {
let tag = &root.tag;
let text = |t: Option<&Tag>| match t {
Some(Tag::String(s)) => Some(s.to_string_lossy().to_string()),
_ => None,
};
if text(tag.get("Status")).is_some_and(|s| s != "minecraft:full" && s != "full") {
return None;
}
if tag.get("isLightOn") != Some(&Tag::Byte(1)) {
return None;
}
let (Some(Tag::Int(x)), Some(Tag::Int(z))) = (tag.get("xPos"), tag.get("zPos")) else {
return None;
};
let mut chunk = Chunk::with_layout(*x, *z, ColumnLayout::VANILLA);
let air = registry.default_state("minecraft:air")?.0;
let Some(Tag::List(sections)) = tag.get("sections") else {
return Some(chunk);
};
let longs = |t: Option<&Tag>| match t {
Some(Tag::LongArray(data)) => Some(data.iter().map(|&w| w as u64).collect::<Vec<_>>()),
_ => None,
};
let mut layers = vec![(None, None); chunk.sections.len()];
for section in sections {
let Some(Tag::Byte(y)) = section.get("Y") else {
continue;
};
let Some(si) = chunk.section_index(i32::from(*y) * 16) else {
continue;
};
let target = Arc::make_mut(&mut chunk.sections[si]);
if let Some(states) = section.get("block_states")
&& let Some(Tag::List(palette)) = states.get("palette")
{
let palette: Vec<u32> = palette
.iter()
.map(|p| {
BlockState::from_nbt(p)
.ok()
.and_then(|s| {
registry.id(&s).or_else(|| {
let default = registry.default_state(&s.name)?;
let mut full = registry.state(default)?.clone();
for (k, v) in &s.properties {
if full.properties.contains_key(k) {
full.properties.insert(k.clone(), v.clone());
}
}
registry.id(&full).or(Some(default))
})
})
.map_or(air, |id| id.0)
})
.collect();
let data = longs(states.get("data"));
if let Ok(blocks) =
PalettedContainer::from_packed(block_strategy(), palette, data.as_deref())
{
target.blocks = blocks;
}
}
if let Some(b) = section.get("biomes")
&& let Some(Tag::List(palette)) = b.get("palette")
{
let palette: Vec<u32> = palette
.iter()
.map(|p| match p {
Tag::String(s) => u32::from(biomes.id(&s.to_string_lossy())),
_ => 0,
})
.collect();
let data = longs(b.get("data"));
if let Ok(container) =
PalettedContainer::from_packed(BIOME_STRATEGY, palette, data.as_deref())
{
target.biomes = container;
}
}
let layer = |name: &str| match section.get(name) {
Some(Tag::ByteArray(a)) if a.len() == 2048 => Some(a.clone()),
_ => None,
};
layers[si] = (layer("SkyLight"), layer("BlockLight"));
}
// `save::load_light`: a section without saved sky light takes the light
// of the blocks above it, from the top of the column down.
let mut above = [15u8; 256];
for (si, (sky, block)) in layers.into_iter().enumerate().rev() {
let mut data = Box::new([0u8; 4096]);
for (i, v) in data.iter_mut().enumerate() {
let nibble =
|layer: &Option<Vec<u8>>| layer.as_ref().map(|l| l[i >> 1] >> ((i & 1) << 2) & 15);
let s = nibble(&sky).unwrap_or(above[i & 255]);
let b = nibble(&block).unwrap_or(0);
*v = s << 4 | b;
}
if sky.is_some() {
for (i, a) in above.iter_mut().enumerate() {
*a = data[i] >> 4;
}
}
let section = Arc::make_mut(&mut chunk.sections[si]);
section.light = Light::Full(data);
section.compact();
}
chunk.lit = true;
chunk.light_loaded = true;
Some(chunk)
}
+37 -5
View File
@@ -207,6 +207,20 @@ impl Assets {
pub fn reload(&self, root: &Path) -> Result<RenderAssets> {
RenderAssets::load(root, self)
}
/// [`Assets::reload`] with the model library already parsed.
///
/// Parsing it reads every model file under `assets/`, which needs no
/// block registry, so a caller that has the files to spare can start
/// it before `Assets::load` finishes and hand the result in here. On
/// a cold cache that is most of a second of reading moved off the
/// critical path.
pub fn reload_with_models(
&self,
root: &Path,
parsed: crate::model_library::ParsedModels,
) -> Result<RenderAssets> {
RenderAssets::load_with_parsed(root, self, true, Some(parsed))
}
/// [`Assets::reload`] for a server, which draws nothing: the sprites'
/// layers, without the block or item models or the textures' pixels.
pub fn reload_for_server(&self, root: &Path) -> Result<RenderAssets> {
@@ -218,6 +232,16 @@ impl RenderAssets {
Self::load_with(root, assets, true)
}
fn load_with(root: &Path, assets: &Assets, draws: bool) -> Result<Self> {
Self::load_with_parsed(root, assets, draws, None)
}
/// `parsed`: the model library when a caller parsed it ahead of this
/// (see [`Assets::reload_with_models`]); otherwise it is parsed here.
fn load_with_parsed(
root: &Path,
assets: &Assets,
draws: bool,
parsed: Option<crate::model_library::ParsedModels>,
) -> Result<Self> {
let registry = assets.registry;
let mut sprites = crate::sprites::Sprites::with_disk_cache(root);
for name in MATERIALS {
@@ -225,17 +249,24 @@ impl RenderAssets {
}
// A server draws no block and no item: its block models (about 24 MB
// baked) and item model library (7 MB) stay empty.
let parsed = if draws {
crate::model_library::ParsedModels::load(root)
} else {
crate::model_library::ParsedModels::default()
let parsed = match parsed {
Some(parsed) => parsed,
None if draws => {
let _step = crate::spans::startup::step("core.models_parse");
crate::model_library::ParsedModels::load(root)
}
None => crate::model_library::ParsedModels::default(),
};
let mut models = if draws {
let _step = crate::spans::startup::step("core.models_bake");
crate::models::prepare_with_models(root, registry, &mut sprites, &parsed)?
} else {
crate::models::PreparedModels::default()
};
let model_library = parsed.into_item_library();
let model_library = {
let _step = crate::spans::startup::step("core.item_library");
parsed.into_item_library()
};
// Fluids are drawn by the fluid renderer, not block models; breaking
// progress uses the destroy-stage overlays.
for name in [
@@ -251,6 +282,7 @@ impl RenderAssets {
sprites.insert(root, &format!("minecraft:block/destroy_stage_{stage}"))?;
}
let fusion = if draws {
let _step = crate::spans::startup::step("core.fusion");
crate::fusion::FusionTextures::load(root, registry, &mut sprites, &mut models.catalog)
} else {
Default::default()
+20 -19
View File
@@ -50,8 +50,9 @@ struct Out {
@builtin(position) clip: vec4<f32>,
@location(0) uv: vec2<f32>,
@location(1) color: vec4<f32>,
@location(2) spherical: f32,
@location(3) cylindrical: f32,
// The distances fog reads: .x spherical, .y cylindrical. One vec2 rather than two floats, so that
// the fragment stage stays within 14 user-defined inputs plus front_facing (GL's limit of 15, #8195).
@location(2) fog_distance: vec2<f32>,
// entity.vsh's overlayColor: the OverlayTexture texel (see overlay_texel).
@location(5) overlay_color: vec4<f32>,
@location(4) @interpolate(flat) overlay: u32,
@@ -157,11 +158,11 @@ fn entity_vertex(position: vec3<f32>, uv: vec2<f32>,
out.back_color = back;
out.overlay_color = overlay_texel(overlay);
// Sky geometry (clouds, celestial bodies) is exempt from render-distance fog.
out.spherical = select(length(position), 0.0, overlay >= 2u && overlay <= 4u);
out.cylindrical = select(max(length(position.xz), abs(position.y)), 0.0, overlay >= 2u && overlay <= 4u);
out.fog_distance.x = select(length(position), 0.0, overlay >= 2u && overlay <= 4u);
out.fog_distance.y = select(max(length(position.xz), abs(position.y)), 0.0, overlay >= 2u && overlay <= 4u);
out.overlay = overlay;
out.glint_uv = vec2(0.0);
if overlay == 4u { out.spherical = length(position); }
if overlay == 4u { out.fog_distance.x = length(position); }
return out;
}
@vertex fn vs_entity(@location(0) position: vec3<f32>, @location(1) uv: vec2<f32>,
@@ -293,7 +294,7 @@ fn entity_color(in: Out, front: bool) -> vec4<f32> {
color = vec4(c, 1.0);
} else if in.overlay == 4u {
// clouds.fsh: alpha fades out towards the cloud fog end.
return vec4(color.rgb, color.a * (1.0 - linear_fog(in.spherical, 0.0, globals.fog_ends.y)));
return vec4(color.rgb, color.a * (1.0 - linear_fog(in.fog_distance.x, 0.0, globals.fog_ends.y)));
}
if color.a < 0.1 || (in.cull != 0u && !front) { discard; }
// entity.fsh calculateFinalColor: the overlay (hurt red, TNT white) over the
@@ -312,8 +313,8 @@ fn entity_color(in: Out, front: bool) -> vec4<f32> {
textureSample(glint_armor_tex, glint_sampler, armor_glint_uv(in.glint_uv)),
);
}
let f = max(linear_fog(in.spherical, globals.fog.x, globals.fog.y),
linear_fog(in.cylindrical, globals.fog.z, globals.fog.w));
let f = max(linear_fog(in.fog_distance.x, globals.fog.x, globals.fog.y),
linear_fog(in.fog_distance.y, globals.fog.z, globals.fog.w));
return vec4(mix(color.rgb, globals.fog_color.rgb, f * globals.fog_color.a), color.a);
}
@@ -327,8 +328,8 @@ fn entity_color(in: Out, front: bool) -> vec4<f32> {
fn shadow_color(in: Out) -> vec4<f32> {
var color = textureSample(atlas, atlas_sampler, in.uv) * in.color;
color *= in.light_color;
let f = max(linear_fog(in.spherical, globals.fog.x, globals.fog.y),
linear_fog(in.cylindrical, globals.fog.z, globals.fog.w));
let f = max(linear_fog(in.fog_distance.x, globals.fog.x, globals.fog.y),
linear_fog(in.fog_distance.y, globals.fog.z, globals.fog.w));
return vec4(mix(color.rgb, globals.fog_color.rgb, f * globals.fog_color.a), color.a);
}
@@ -347,8 +348,8 @@ fn shadow_color(in: Out) -> vec4<f32> {
let texel = textureSample(atlas, atlas_sampler, uv);
if texel.a < 0.1 { discard; }
// Fog hides a light source and the light on a surface as it hides everything else.
let fogged = max(linear_fog(in.spherical, globals.fog.x, globals.fog.y),
linear_fog(in.cylindrical, globals.fog.z, globals.fog.w)) * globals.fog_color.a;
let fogged = max(linear_fog(in.fog_distance.x, globals.fog.x, globals.fog.y),
linear_fog(in.fog_distance.y, globals.fog.z, globals.fog.w)) * globals.fog_color.a;
if in.tier == 0u {
return vec4(0.0, 0.0, 0.0, hdr_scene_alpha(mix(in.scene, globals.hdr_light.y, fogged)));
}
@@ -379,7 +380,7 @@ fn hdr_mark(tier: u32, y: f32) -> f32 {
// HDR lighting on clouds, drawn again after them with only alpha written: they're lit by the
// sky, so they take its value, which their blending would otherwise cover.
@fragment fn fs_hdr_cloud_mark(in: Out) -> @location(0) vec4<f32> {
let a = in.color.a * (1.0 - linear_fog(in.spherical, 0.0, globals.fog_ends.y));
let a = in.color.a * (1.0 - linear_fog(in.fog_distance.x, 0.0, globals.fog_ends.y));
if a < 0.1 { discard; }
return vec4(0.0, 0.0, 0.0, hdr_scene_alpha(globals.hdr_light.y));
}
@@ -388,8 +389,8 @@ fn celestial_color(in: Out) -> vec4<f32> {
// RenderPipelines.DRAGON_RAYS / rendertype_lightning.fsh: untextured
// vertex colour, with fog fading both RGB and alpha before additive blending.
if in.overlay == 37u {
let fog = max(linear_fog(in.spherical, globals.fog.x, globals.fog.y),
linear_fog(in.cylindrical, globals.fog.z, globals.fog.w));
let fog = max(linear_fog(in.fog_distance.x, globals.fog.x, globals.fog.y),
linear_fog(in.fog_distance.y, globals.fog.z, globals.fog.w));
return in.color * (1.0 - fog);
}
return textureSample(atlas, atlas_sampler, in.uv) * in.color * in.light_color;
@@ -428,8 +429,8 @@ fn energy_swirl_base(in: Out) -> vec4<f32> {
return vec4(color.rgb * (128.0 / 255.0), color.a);
}
fn energy_swirl_fog(in: Out) -> f32 {
let f = max(linear_fog(in.spherical, globals.fog.x, globals.fog.y),
linear_fog(in.cylindrical, globals.fog.z, globals.fog.w));
let f = max(linear_fog(in.fog_distance.x, globals.fog.x, globals.fog.y),
linear_fog(in.fog_distance.y, globals.fog.z, globals.fog.w));
return f * globals.fog_color.a;
}
@fragment fn fs_energy_swirl(in: Out) -> @location(0) vec4<f32> {
@@ -572,7 +573,7 @@ fn weather_color(in: Out) -> vec4<f32> {
var color = textureLoad(atlas, texel, 0) * in.color;
if color.a < 0.1 { discard; }
color *= in.light_color;
let f = max(linear_fog(in.spherical, globals.fog.x, globals.fog.y),
linear_fog(in.cylindrical, globals.fog.z, globals.fog.w));
let f = max(linear_fog(in.fog_distance.x, globals.fog.x, globals.fog.y),
linear_fog(in.fog_distance.y, globals.fog.z, globals.fog.w));
return vec4(mix(color.rgb, globals.fog_color.rgb, f * globals.fog_color.a), color.a);
}
@@ -120,7 +120,7 @@ pub struct Environment {
tracks: HashMap<String, Track>,
base: HashMap<String, [f32; 4]>,
}
#[derive(Clone, Copy, Debug, Default)]
#[derive(Clone, Copy, Debug, Default, serde::Serialize, serde::Deserialize)]
pub struct Sky {
pub sky_color: [f32; 3],
pub fog_color: [f32; 3],
+1 -1
View File
@@ -21,7 +21,7 @@ pub enum FogType {
}
/// The fog uniform (`FogData`).
#[derive(Clone, Copy, Debug, PartialEq)]
#[derive(Clone, Copy, Debug, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct FogData {
pub color: [f32; 4],
pub environmental_start: f32,
+146 -41
View File
@@ -104,8 +104,11 @@ struct FontSet {
providers: Vec<Provider>,
/// Every char drawn looks up here, so the hasher is Fx, not SipHash.
glyphs: crate::fast_hash::FxHashMap<char, Glyph>,
/// `glyphsByWidth` for obfuscated text (built on first use).
by_width: Option<HashMap<u32, Vec<char>>>,
/// `SelectedGlyphs.nonFishy` of the characters whose first glyph has a fishy advance (the
/// others use `glyphs`): what obfuscated text draws.
non_fishy: crate::fast_hash::FxHashMap<char, Glyph>,
/// `glyphsByWidth` for obfuscated text (built on first use), by `ceil(advance)`.
by_width: Option<HashMap<i32, Vec<char>>>,
}
/// The atlas region glyphs are rasterized into, filled in rows.
struct Region {
@@ -258,10 +261,11 @@ fn used_width(pixels: &[u8], stride: u32, (cx, cy, cw, ch): (u32, u32, u32, u32)
})
.map_or(0, |x| x + 1)
}
/// `FontSet.hasFishyAdvance`: a provider glyph whose advance is under 0 or
/// over 32 is not used. `FontSet.computeGlyphInfo` moves on to the next
/// provider that has the character, so a pack's absurd advance cannot widen
/// a line; Horizon keeps one advance per glyph and tests it here.
/// `FontSet.hasFishyAdvance`: an advance under 0 or over 32. Such a glyph is still the one drawn
/// (`SelectedGlyphs.any` is the first provider's); only `SelectedGlyphs.nonFishy`, what obfuscated
/// text draws, moves on to the next provider that has the character. Packs rely on it: a `space`
/// provider's kerning runs from -512 to 512, and a tall bitmap's glyphs pass 32. Horizon keeps one
/// advance per glyph and tests it here.
fn fishy_advance(advance: f32) -> bool {
!(0.0..=32.0).contains(&advance)
}
@@ -674,6 +678,7 @@ impl Font {
FontSet {
providers,
glyphs: Default::default(),
non_fishy: Default::default(),
by_width: None,
}
}
@@ -682,6 +687,7 @@ impl Font {
let mut cache = self.cache.borrow_mut();
for (_, set) in &mut cache.sets {
set.glyphs.clear();
set.non_fishy.clear();
set.by_width = None;
}
cache.region.cursor = (0, 0);
@@ -735,7 +741,7 @@ impl Font {
return *g;
}
let was_full = std::mem::replace(&mut region.full, false);
let found = self.resolve(set, region, c);
let found = self.resolve(set, region, c, false);
// No room: the missing glyph for now, not remembered, so the
// character is tried again once `begin_frame` cleared the region.
let overflowed = std::mem::replace(&mut region.full, was_full);
@@ -747,13 +753,46 @@ impl Font {
set.glyphs.insert(c, glyph);
glyph
}
fn resolve(&self, set: &mut FontSet, region: &mut Region, c: char) -> Option<Glyph> {
/// `FontSet.getRandomGlyph`'s `SelectedGlyphs.nonFishy`: the glyph of the first provider whose
/// advance is not fishy, else the missing glyph. A character whose first glyph is fine has
/// the same one for both.
fn glyph_non_fishy(&self, id: &str, c: char) -> Glyph {
let any = self.glyph_of(id, c);
if !fishy_advance(any.advance) {
return any;
}
let mut cache = self.cache.borrow_mut();
let Cache { sets, region, .. } = &mut *cache;
let Some((_, set)) = sets.iter_mut().find(|(k, _)| k == id) else {
return self.missing;
};
if let Some(g) = set.non_fishy.get(&c) {
return *g;
}
let was_full = std::mem::replace(&mut region.full, false);
let found = self.resolve(set, region, c, true);
let overflowed = std::mem::replace(&mut region.full, was_full);
region.full |= overflowed;
if overflowed {
return self.missing;
}
let glyph = found.unwrap_or(self.missing);
set.non_fishy.insert(c, glyph);
glyph
}
fn resolve(
&self,
set: &mut FontSet,
region: &mut Region,
c: char,
non_fishy: bool,
) -> Option<Glyph> {
let (uniform, japanese) = (self.uniform, self.japanese);
for provider in &mut set.providers {
match provider {
Provider::Space(advances) => {
if let Some(a) = advances.get(&c)
&& !fishy_advance(*a)
&& !(non_fishy && fishy_advance(*a))
{
return Some(Glyph {
rect: None,
@@ -768,10 +807,12 @@ impl Font {
}
Provider::Bitmap(filter, glyphs) if filter.passes(uniform, japanese) => {
match glyphs.get(&c) {
Some(BitmapGlyph::Atlas(g)) if !fishy_advance(g.advance) => {
Some(BitmapGlyph::Atlas(g)) if !(non_fishy && fishy_advance(g.advance)) => {
return Some(*g);
}
Some(BitmapGlyph::Sheet(cell)) if !fishy_advance(cell.glyph.advance) => {
Some(BitmapGlyph::Sheet(cell))
if !(non_fishy && fishy_advance(cell.glyph.advance)) =>
{
let (stride, pixels) = (&cell.sheet.0, &cell.sheet.1);
let mut rgba = Vec::with_capacity((cell.w * cell.h * 4) as usize);
for y in cell.y..cell.y + cell.h {
@@ -791,14 +832,14 @@ impl Font {
Provider::Unihex(filter, def, glyphs) if filter.passes(uniform, japanese) => {
let glyphs = glyphs.get_or_insert_with(|| load_hex(&self.root, def));
if let Some(h) = glyphs.get(&u32::from(c)).copied()
&& !fishy_advance(hex_advance(&h))
&& !(non_fishy && fishy_advance(hex_advance(&h)))
{
return self.rasterize_hex(region, h);
}
}
Provider::TrueType(filter, ttf) if filter.passes(uniform, japanese) => {
if let Some(id) = ttf.ids.get(&c)
&& !fishy_advance(ttf.advance(*id))
&& !(non_fishy && fishy_advance(ttf.advance(*id)))
{
let (glyph, bitmap) = ttf.glyph(*id);
return match bitmap {
@@ -851,7 +892,7 @@ impl Font {
pub fn random_glyph(&self, style: &Style, advance: f32) -> Glyph {
use horizon_core::random::RandomSource;
let id = style.font.as_deref().unwrap_or(DEFAULT);
let width = advance.ceil() as u32;
let width = advance.ceil() as i32;
let pick = {
let mut cache = self.cache.borrow_mut();
let Cache { sets, random, .. } = &mut *cache;
@@ -869,9 +910,9 @@ impl Font {
chars.get(i as usize).copied()
})
};
pick.map_or(self.missing, |c| self.glyph_of(id, c))
pick.map_or(self.missing, |c| self.glyph_non_fishy(id, c))
}
fn glyphs_by_width(&self, set: &mut FontSet) -> HashMap<u32, Vec<char>> {
fn glyphs_by_width(&self, set: &mut FontSet) -> HashMap<i32, Vec<char>> {
let (uniform, japanese) = (self.uniform, self.japanese);
let mut chars = std::collections::BTreeSet::new();
let mut in_atlas = false;
@@ -893,33 +934,31 @@ impl Font {
// Nothing in the atlas: the glyphs below U+0250, rasterized as used.
chars.extend((0..0x250u32).filter_map(char::from_u32));
}
let mut out: HashMap<u32, Vec<char>> = HashMap::new();
let mut out: HashMap<i32, Vec<char>> = HashMap::new();
for c in chars {
if let Some(advance) = self.provider_advance(set, c) {
out.entry(advance.ceil() as u32).or_default().push(c);
out.entry(advance.ceil() as i32).or_default().push(c);
}
}
out
}
/// A character's advance in `set` (its first provider that has it),
/// without rasterizing it.
/// A character's advance in `set` (its first provider that has it, fishy or not, as the
/// by-width table of `FontSet.reload` takes it), without rasterizing it.
fn provider_advance(&self, set: &mut FontSet, c: char) -> Option<f32> {
let (uniform, japanese) = (self.uniform, self.japanese);
for provider in &mut set.providers {
match provider {
Provider::Space(advances) => {
if let Some(a) = advances.get(&c)
&& !fishy_advance(*a)
{
if let Some(a) = advances.get(&c) {
return Some(*a);
}
}
Provider::Bitmap(filter, glyphs) if filter.passes(uniform, japanese) => {
match glyphs.get(&c) {
Some(BitmapGlyph::Atlas(g)) if !fishy_advance(g.advance) => {
Some(BitmapGlyph::Atlas(g)) => {
return Some(g.advance);
}
Some(BitmapGlyph::Sheet(cell)) if !fishy_advance(cell.glyph.advance) => {
Some(BitmapGlyph::Sheet(cell)) => {
return Some(cell.glyph.advance);
}
_ => {}
@@ -927,16 +966,12 @@ impl Font {
}
Provider::Unihex(filter, def, glyphs) if filter.passes(uniform, japanese) => {
let glyphs = glyphs.get_or_insert_with(|| load_hex(&self.root, def));
if let Some(h) = glyphs.get(&u32::from(c))
&& !fishy_advance(hex_advance(h))
{
if let Some(h) = glyphs.get(&u32::from(c)) {
return Some(hex_advance(h));
}
}
Provider::TrueType(filter, ttf) if filter.passes(uniform, japanese) => {
if let Some(id) = ttf.ids.get(&c)
&& !fishy_advance(ttf.advance(*id))
{
if let Some(id) = ttf.ids.get(&c) {
return Some(ttf.advance(*id));
}
}
@@ -1406,12 +1441,13 @@ mod tests {
assert!(!font.take_patches().is_empty());
}
/// `FontSet.computeGlyphInfo`: a provider glyph with an advance outside
/// 0..32 is skipped, so the next provider that has the character is used.
/// `FontSet.computeGlyphInfo`: `SelectedGlyphs.any` is the first provider's glyph, fishy
/// advance or not, and is what is drawn and measured; `nonFishy`, what obfuscated text draws,
/// is the first provider whose advance is within 0..32, else the missing glyph.
#[test]
fn a_fishy_advance_falls_through_to_the_next_provider() {
// 64 opaque columns: the first provider's 'a' would advance 65, past
// the 32 vanilla allows, so the narrow provider's 'a' is the one used.
fn a_fishy_glyph_is_drawn_and_only_obfuscated_text_falls_through() {
// 64 opaque columns: the first provider's 'a' advances 65, past the 32 vanilla
// calls fishy, and the narrow provider's 'a' advances 3.
let wide = png(64, 8, |_, _| true);
let narrow = png(16, 8, |x, _| x < 2);
let def = br#"{"providers":[{"type":"bitmap","file":"minecraft:font/wide.png","ascent":7,"chars":["a"]},{"type":"bitmap","file":"minecraft:font/narrow.png","ascent":7,"chars":["a"]}]}"#;
@@ -1425,11 +1461,80 @@ mod tests {
);
let font = load(&root);
let _ = std::fs::remove_dir_all(&root);
assert_eq!(font.glyph('a').advance, 3.0, "the narrow provider wins");
assert_eq!(font.advance('a', &Style::default()), 3.0);
// Obfuscated text picks a glyph by its own advance: nothing is 65 wide.
let obfuscated = font.random_glyph(&Style::default(), 65.0);
assert_eq!(obfuscated.advance, 6.0, "the missing glyph");
let drawn = font.glyph('a');
assert_eq!(drawn.advance, 65.0, "the first provider's glyph is drawn");
assert!(drawn.rect.is_some());
assert_eq!(font.advance('a', &Style::default()), 65.0);
// The by-width table files 'a' under its first glyph's 65; the glyph it then draws is
// the narrow provider's (`nonFishy`).
assert_eq!(font.random_glyph(&Style::default(), 65.0).advance, 3.0);
// Nothing else is 3 wide in the table, and the missing glyph is 6.
assert_eq!(font.random_glyph(&Style::default(), 3.0).advance, 6.0);
}
/// A `space` provider's shift glyphs (kerning in server packs: -512 to 512) are drawn and
/// measured as they are, and `nonFishy` has nothing else to draw for them.
#[test]
fn space_glyphs_with_any_advance_are_kept() {
let shifts: Vec<i32> = (0..10)
.map(|i| -(1 << i))
.chain((0..10).map(|i| 1 << i))
.collect();
let advances: Vec<String> = shifts
.iter()
.enumerate()
.map(|(i, a)| format!("\"\\ue{:03x}\": {a}", i))
.collect();
let def = format!(
r#"{{"providers":[{{"type":"space","advances":{{{}}}}}]}}"#,
advances.join(",")
);
let root = root(
"space-shifts",
&[("assets/minecraft/font/default.json", def.as_bytes())],
);
let font = load(&root);
let _ = std::fs::remove_dir_all(&root);
for (i, a) in shifts.iter().enumerate() {
let c = char::from_u32(0xe000 + i as u32).unwrap();
assert_eq!(font.glyph(c).advance, *a as f32, "{c:?}");
assert_eq!(font.advance(c, &Style::default()), *a as f32);
}
// Obfuscated text asks for a glyph of a given width: a fishy space has none to give.
let c = char::from_u32(0xe000 + 19).unwrap();
assert_eq!(font.glyph(c).advance, 512.0);
assert_eq!(
font.glyph_non_fishy(DEFAULT, c).advance,
6.0,
"the missing glyph"
);
assert_eq!(font.random_glyph(&Style::default(), 512.0).advance, 6.0);
}
/// Nexo's GUI glyphs: a bitmap `height` of 287 with no advance, so every glyph wider than 31
/// pixels has a fishy advance, and is still drawn.
#[test]
fn a_wide_bitmap_glyph_is_drawn() {
let sheet = png(40, 287, |_, _| true);
let def = br#"{"providers":[{"type":"bitmap","file":"minecraft:font/gui.png","height":287,"ascent":65,"chars":["a"]}]}"#;
let root = root(
"wide-bitmap",
&[
("assets/minecraft/font/default.json", def),
("assets/minecraft/textures/font/gui.png", &sheet),
],
);
let font = load(&root);
let _ = std::fs::remove_dir_all(&root);
let g = font.glyph('a');
assert_eq!(g.advance, 41.0, "the glyph's 40 columns and one");
assert!(g.rect.is_some(), "drawn, not the missing glyph");
assert!(fishy_advance(g.advance));
assert_eq!(
font.glyph_non_fishy(DEFAULT, 'a').advance,
6.0,
"excluded from what obfuscated text draws"
);
}
/// StringDecomposer.iterateFormatted: a `§` that ends a part stops that
File diff suppressed because it is too large. Load diff
@@ -877,6 +877,8 @@ mod tests {
start,
translucent_at,
solid,
solid_slots: u64::from(solid) * 4,
packed: false,
sides: crate::mesher::Sides::unsorted(solid),
translucent,
sort: super::super::translucency::SortState::new(Vec::new()),
@@ -1014,7 +1016,7 @@ mod tests {
label: None,
entries: &[],
});
let pipeline = |layout: &wgpu::PipelineLayout, label: &str, _: &str, _: &str, _, _| {
let pipeline = |layout: &wgpu::PipelineLayout, label: &str, _: &str, _: &str, _, _, _| {
device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
label: Some(label),
layout: Some(layout),
@@ -1071,6 +1073,8 @@ mod tests {
start: 0,
translucent_at: (0, at),
solid: 64,
solid_slots: 64 * 4,
packed: false,
sides: crate::mesher::Sides::unsorted(64),
translucent: 128,
sort: super::super::translucency::SortState::new(Vec::new()),
@@ -1295,6 +1299,8 @@ mod tests {
start: 0,
translucent_at: if indices { (7, 7) } else { at },
solid,
solid_slots: u64::from(solid) * 4,
packed: false,
sides: crate::mesher::Sides::unsorted(solid),
translucent,
sort: super::super::translucency::SortState::new(Vec::new()),
@@ -0,0 +1,574 @@
//! `horizon-ctl render-capture`: what the renderer needs to draw the current frame again
//! without the game, for `examples/scene_replay.rs` (docs/graphics.md, "Render capture and
//! replay").
//!
//! The renderer keeps no CPU copy of the meshes it uploads, so while capturing is on
//! (`Renderer::keep_capture_copies`) it keeps one of every section and far tile mesh as it is
//! handed over, at the mesher-to-renderer seam. A capture writes those of the sections and
//! tiles it holds, the frame's camera and inputs, and the settings that change GPU work. Only
//! the build that wrote a capture reads it.
//!
//! Files: `scene.json` (`Scene`), `sections.json` and `tiles.json` (one `MeshRecord` per mesh,
//! in order), `sections.bin` and `tiles.bin` (each mesh's solid then translucent
//! `TerrainVertex`es), `celestial.bin` (the sun and moon `Vertex`es).
use super::{Frame, Renderer, SectionKey};
use crate::{
Result,
environment::Sky,
fast_hash::{FxHashMap, FxHashSet},
fog::FogData,
graphics::GraphicsApi,
hud::HudBatch,
lod::TileKey,
mesher::{SectionMesh, Sides, TerrainVertex, Vertex},
};
use glam::{DVec3, Mat4, Vec3};
use serde::{Deserialize, Serialize};
use std::{
fs::{self, File},
io::{BufReader, BufWriter, Read, Write},
path::{Path, PathBuf},
};
/// CPU copies of the meshes uploaded since capturing was turned on.
#[derive(Default)]
pub(super) struct Copies {
sections: FxHashMap<SectionKey, SectionMesh>,
tiles: FxHashMap<TileKey, SectionMesh>,
}
impl Copies {
pub(super) fn section(&mut self, key: SectionKey, mesh: &SectionMesh) {
self.sections.insert(key, copy(mesh));
}
/// Columns unloaded (`Renderer::remove_columns`).
pub(super) fn remove_columns(&mut self, columns: &[(i32, i32)]) {
if columns.is_empty() {
return;
}
let gone: FxHashSet<(i32, i32)> = columns.iter().copied().collect();
self.sections
.retain(|&(x, _, z), _| !gone.contains(&(x, z)));
}
pub(super) fn tile(&mut self, key: TileKey, mesh: &SectionMesh) {
self.tiles.insert(key, copy(mesh));
}
pub(super) fn forget_tile(&mut self, key: TileKey) {
self.tiles.remove(&key);
}
pub(super) fn clear_tiles(&mut self) {
self.tiles.clear();
}
}
fn copy(mesh: &SectionMesh) -> SectionMesh {
SectionMesh {
solid: mesh.solid.clone(),
sides: mesh.sides,
translucent: mesh.translucent.clone(),
packed: mesh.packed.clone(),
solid_tints: Vec::new(),
visibility: mesh.visibility,
block_entities: mesh.block_entities.clone(),
lights: mesh.lights.clone(),
sprite_layers: mesh.sprite_layers.clone(),
bounds: mesh.bounds,
keep: mesh.keep,
}
}
/// A capture asked for: where to write it, and the game's settings the renderer does not hold.
pub struct Request {
pub dir: PathBuf,
pub settings: Settings,
}
/// The game's settings that change GPU work, as the game applied them to the renderer.
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Settings {
/// `GraphicsApi`'s variant name.
pub graphics_api: String,
pub translucent_batching: bool,
/// `textureFiltering` and `maxAnisotropyBit` (`Renderer::set_texture_filtering`).
pub texture_filtering: i32,
pub anisotropy_bit: i32,
pub mipmap_levels: u32,
/// `Renderer::set_world_post`'s arguments.
pub resolution_scale: f32,
pub fxaa: bool,
pub taa: bool,
pub upscale: f32,
/// Chunks.
pub render_distance: i32,
pub lod_distance: u32,
/// The game's prepared resources, where the replay loads the block sprites from.
pub resources: PathBuf,
/// The block sprites the meshes were made against.
pub atlas: AtlasCheck,
}
impl Settings {
pub fn graphics_api(&self) -> GraphicsApi {
GraphicsApi::ALL
.into_iter()
.find(|api| format!("{api:?}") == self.graphics_api)
.unwrap_or_default()
}
}
/// Which block sprite layers the meshes' vertices name: the replay's must be the same.
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub struct AtlasCheck {
pub sprite_size: u32,
pub texture_layers: u32,
/// FNV-1a of every sprite's name and layer.
pub layers: u64,
}
impl AtlasCheck {
pub fn of(render: &crate::assets::RenderAssets) -> Self {
let mut hash = 0xcbf2_9ce4_8422_2325u64;
for (name, layer) in &render.sprite_layers {
for byte in name.bytes().chain(layer.to_le_bytes()) {
hash = (hash ^ u64::from(byte)).wrapping_mul(0x0000_0100_0000_01b3);
}
}
Self {
sprite_size: render.sprite_size,
texture_layers: render.texture_layers,
layers: hash,
}
}
}
/// The renderer's own state that changes GPU work.
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct RendererState {
pub adapter: String,
pub backend: String,
/// The frame's size in pixels.
pub size: [u32; 2],
/// The column layout: lowest block y and sections.
pub min_y: i32,
pub sections: usize,
pub flat_draws: bool,
pub section_cull: bool,
pub section_sides: bool,
pub gpu_culling: bool,
pub gamma: f32,
pub fullbright: bool,
pub improved_transparency: bool,
pub animated_textures: bool,
/// A shader pack was running; the replay draws without it.
pub shader_pack: bool,
}
/// The cloud inputs of the frame (`clouds::Input`), with the clouds texture.
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Clouds {
pub texture: (u32, u32, Vec<bool>),
pub uv: [f32; 2],
pub camera: [f64; 3],
pub time: i64,
pub partial_tick: f64,
pub range: i32,
pub fast: bool,
pub color: [f32; 4],
}
/// The frame's camera and the inputs of its globals, sky, fog and lightmap.
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct FrameInputs {
pub camera: [f64; 3],
pub yaw: f32,
pub pitch: f32,
pub fov_degrees: f32,
pub eye: [f64; 3],
pub eye_rotation: [f32; 2],
pub first_person: bool,
pub bob: [f32; 16],
pub spin: [f32; 16],
pub sky: Sky,
pub distance: f32,
pub detail_distance: f32,
pub depth_far: f32,
pub underwater: bool,
pub water_plane: Option<f32>,
pub cave_culling: bool,
pub sky_blocked: bool,
pub skybox: bool,
pub end_sky: bool,
pub end_sky_sprite: Option<[f32; 4]>,
pub environment_fog: Option<(f32, f32)>,
pub water_fog: [f32; 3],
pub fog: Option<FogData>,
pub dark_disc: bool,
pub nether_lighting: bool,
pub glint_alpha: f32,
pub glint_ticks: f32,
pub hand_fov_degrees: f32,
pub stars: Option<([f32; 16], f32)>,
pub clouds: Option<Clouds>,
pub game_time: f32,
pub shader_game_time: f32,
pub end_portal_sprites: [[f32; 4]; 2],
pub crumbling_sprite: [f32; 4],
pub ticks: u64,
pub darkness: (f32, f32),
pub night_vision: f32,
pub block_flicker: f32,
pub boss_darken: f32,
}
/// `scene.json`.
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Scene {
pub settings: Settings,
pub renderer: RendererState,
pub frame: FrameInputs,
pub sections: usize,
pub tiles: usize,
/// The chunk columns far tiles leave out for full-detail sections.
pub lod_cutout: Vec<(i32, i32)>,
/// `celestial.bin`.
#[serde(skip)]
pub celestial: Vec<Vertex>,
}
/// One mesh of `sections.json` or `tiles.json`; its vertices follow the previous mesh's in
/// the `.bin` file. `key` is (x, section y, z) for a section, (x, z, level) for a tile.
#[derive(Serialize, Deserialize)]
struct MeshRecord {
key: [i32; 3],
solid: usize,
translucent: usize,
sides: Sides,
visibility: u64,
block_entities: Vec<([i32; 3], u32)>,
lights: Vec<([i32; 3], u32)>,
sprite_layers: Vec<u16>,
bounds: Option<[[f32; 3]; 2]>,
keep: bool,
}
/// Writes `name.json` and `name.bin`: (meshes, vertex bytes).
fn write_meshes<'m>(
dir: &Path,
name: &str,
meshes: impl Iterator<Item = ([i32; 3], &'m SectionMesh)>,
) -> Result<(usize, u64)> {
let mut blob = BufWriter::new(File::create(dir.join(format!("{name}.bin")))?);
let mut records = Vec::new();
let mut bytes = 0u64;
for (key, mesh) in meshes {
for part in [&mesh.solid, &mesh.translucent] {
let raw: &[u8] = bytemuck::cast_slice(part.as_slice());
blob.write_all(raw)?;
bytes += raw.len() as u64;
}
records.push(MeshRecord {
key,
solid: mesh.solid.len(),
translucent: mesh.translucent.len(),
sides: mesh.sides,
visibility: mesh.visibility,
block_entities: mesh.block_entities.clone(),
lights: mesh.lights.clone(),
sprite_layers: mesh.sprite_layers.clone(),
bounds: mesh
.bounds
.map(|[min, max]| [min.to_array(), max.to_array()]),
keep: mesh.keep,
});
}
blob.flush()?;
let mut list = BufWriter::new(File::create(dir.join(format!("{name}.json")))?);
serde_json::to_writer(&mut list, &records)?;
list.flush()?;
Ok((records.len(), bytes))
}
/// Reads `name.json` and `name.bin`, handing each mesh to `each` as it is read.
pub fn read_meshes(
dir: &Path,
name: &str,
mut each: impl FnMut([i32; 3], SectionMesh),
) -> Result<()> {
let records: Vec<MeshRecord> = serde_json::from_reader(BufReader::new(File::open(
dir.join(format!("{name}.json")),
)?))?;
let mut blob = BufReader::new(File::open(dir.join(format!("{name}.bin")))?);
for record in records {
let mut solid = vec![<TerrainVertex as bytemuck::Zeroable>::zeroed(); record.solid];
blob.read_exact(bytemuck::cast_slice_mut::<TerrainVertex, u8>(
solid.as_mut_slice(),
))?;
let mut translucent =
vec![<TerrainVertex as bytemuck::Zeroable>::zeroed(); record.translucent];
blob.read_exact(bytemuck::cast_slice_mut::<TerrainVertex, u8>(
translucent.as_mut_slice(),
))?;
each(
record.key,
SectionMesh {
solid,
sides: record.sides,
translucent,
visibility: record.visibility,
block_entities: record.block_entities,
lights: record.lights,
sprite_layers: record.sprite_layers,
bounds: record
.bounds
.map(|[min, max]| [Vec3::from_array(min), Vec3::from_array(max)]),
keep: record.keep,
..Default::default()
},
);
}
Ok(())
}
impl Renderer {
/// Keeps CPU copies of the meshes uploaded from now on, for `render-capture`, or drops
/// them. They start empty: the caller meshes everything again for a complete capture.
pub fn keep_capture_copies(&mut self, on: bool) {
if on != self.capture_copies.is_some() {
self.capture_copies = on.then(Copies::default);
}
}
pub fn keeps_capture_copies(&self) -> bool {
self.capture_copies.is_some()
}
/// Writes the scene `frame` draws to `request.dir` (`render` calls it for `capture`).
pub(super) fn write_capture(
&self,
request: &Request,
frame: &Frame,
) -> Result<serde_json::Value> {
let copies = self
.capture_copies
.as_ref()
.ok_or("no mesh copies kept: render-capture on first")?;
let dir = &request.dir;
fs::create_dir_all(dir)?;
let (sections, section_bytes) = write_meshes(
dir,
"sections",
copies
.sections
.iter()
.map(|(&(x, y, z), mesh)| ([x, y, z], mesh)),
)?;
let standing = self.standing_lods();
let (tiles, tile_bytes) = write_meshes(
dir,
"tiles",
copies
.tiles
.iter()
.filter(|(key, _)| standing.contains(*key))
.map(|(key, mesh)| ([key.x, key.z, i32::from(key.level)], mesh)),
)?;
fs::write(
dir.join("celestial.bin"),
bytemuck::cast_slice::<Vertex, u8>(frame.celestial),
)?;
let scene = Scene {
settings: request.settings.clone(),
renderer: RendererState {
adapter: self.info.name.clone(),
backend: format!("{:?}", self.info.backend),
size: [self.config.width, self.config.height],
min_y: self.layout.min_y(),
sections: self.layout.sections(),
flat_draws: self.flat_draws(),
section_cull: self.section_cull(),
section_sides: self.section_sides(),
gpu_culling: self.gpu_culling(),
gamma: self.gamma,
fullbright: self.fullbright,
improved_transparency: self.improved_transparency,
animated_textures: self.animated_textures,
shader_pack: self.pack_post.is_some() || self.native.is_some(),
},
frame: FrameInputs {
camera: frame.camera.to_array(),
yaw: frame.yaw,
pitch: frame.pitch,
fov_degrees: frame.fov_degrees,
eye: frame.eye.to_array(),
eye_rotation: frame.eye_rotation,
first_person: frame.first_person,
bob: frame.bob.to_cols_array(),
spin: frame.spin.to_cols_array(),
sky: frame.sky,
distance: frame.distance,
detail_distance: frame.detail_distance,
depth_far: frame.depth_far,
underwater: frame.underwater,
water_plane: frame.water_plane,
cave_culling: frame.cave_culling,
sky_blocked: frame.sky_blocked,
skybox: frame.skybox,
end_sky: frame.end_sky,
end_sky_sprite: frame.end_sky_sprite,
environment_fog: frame.environment_fog,
water_fog: frame.water_fog,
fog: frame.fog,
dark_disc: frame.dark_disc,
nether_lighting: frame.nether_lighting,
glint_alpha: frame.glint_alpha,
glint_ticks: frame.glint_ticks,
hand_fov_degrees: frame.hand_fov_degrees,
stars: frame
.stars
.map(|(rotation, brightness)| (rotation.to_cols_array(), brightness)),
clouds: frame.clouds.as_ref().map(|c| Clouds {
texture: c.texture.clone(),
uv: c.uv,
camera: c.camera.to_array(),
time: c.time,
partial_tick: c.partial_tick,
range: c.range,
fast: c.fast,
color: c.color,
}),
game_time: frame.game_time,
shader_game_time: frame.shader_game_time,
end_portal_sprites: frame.end_portal_sprites,
crumbling_sprite: frame.crumbling_sprite,
ticks: frame.ticks,
darkness: frame.darkness,
night_vision: frame.night_vision,
block_flicker: frame.block_flicker,
boss_darken: frame.boss_darken,
},
sections,
tiles,
lod_cutout: self.lod_cutout.iter().copied().collect(),
celestial: Vec::new(),
};
let mut out = BufWriter::new(File::create(dir.join("scene.json"))?);
serde_json::to_writer_pretty(&mut out, &scene)?;
out.flush()?;
Ok(serde_json::json!({
"ok": true,
"dir": dir.display().to_string(),
"sections": sections,
"tiles": tiles,
"vertex_bytes": section_bytes + tile_bytes,
"shader_pack_left_out": scene.renderer.shader_pack,
}))
}
}
impl Scene {
/// Reads `scene.json` and `celestial.bin` (the meshes: `read_meshes`).
pub fn read(dir: &Path) -> Result<Self> {
let mut scene: Scene =
serde_json::from_reader(BufReader::new(File::open(dir.join("scene.json"))?))?;
let bytes = fs::read(dir.join("celestial.bin"))?;
let size = std::mem::size_of::<Vertex>();
let mut celestial = vec![<Vertex as bytemuck::Zeroable>::zeroed(); bytes.len() / size];
let len = celestial.len() * size;
bytemuck::cast_slice_mut::<Vertex, u8>(celestial.as_mut_slice())
.copy_from_slice(&bytes[..len]);
scene.celestial = celestial;
Ok(scene)
}
/// The captured frame: its camera, sky, fog, clouds, sun, moon and stars, without
/// entities, particles, weather, the hand, the outline or the HUD.
pub fn frame<'a>(&'a self, hud: &'a HudBatch) -> Frame<'a> {
let f = &self.frame;
Frame {
weather: &[],
weather_time: crate::weather::Time::new(0, 0.0),
camera: DVec3::from_array(f.camera),
yaw: f.yaw,
pitch: f.pitch,
fov_degrees: f.fov_degrees,
eye: DVec3::from_array(f.eye),
eye_rotation: f.eye_rotation,
first_person: f.first_person,
bob: Mat4::from_cols_array(&f.bob),
spin: Mat4::from_cols_array(&f.spin),
sky: f.sky,
shadow_scene_revision: (0, 0),
shadow_cache: false,
distance: f.distance,
detail_distance: f.detail_distance,
depth_far: f.depth_far,
underwater: f.underwater,
water_plane: f.water_plane,
cave_culling: f.cave_culling,
title: false,
sky_blocked: f.sky_blocked,
skybox: f.skybox,
end_sky: f.end_sky,
end_sky_sprite: f.end_sky_sprite,
environment_fog: f.environment_fog,
water_fog: f.water_fog,
fog: f.fog,
dark_disc: f.dark_disc,
outline: Vec::new(),
outline_after_terrain: false,
outline_high_contrast: false,
debug_lines: &[],
debug_lines_on_top: &[],
debug_crosshair: &[],
hud,
glint_alpha: f.glint_alpha,
glint_ticks: f.glint_ticks,
nether_lighting: f.nether_lighting,
entities: &[],
static_block_entities: &[],
visible_static_block_entity_sections: &[],
static_block_entity_stats: Default::default(),
entity_motion: &[],
entity_spans: &[],
skin: None,
glowing: &[],
dynamic_lights: &[],
colored_lights: &[],
emissive_layers: &[],
clouds: f.clouds.as_ref().map(|c| crate::clouds::Input {
texture: &c.texture,
uv: c.uv,
camera: DVec3::from_array(c.camera),
time: c.time,
partial_tick: c.partial_tick,
range: c.range,
fast: c.fast,
color: c.color,
}),
lightning: Default::default(),
additive: &[],
see_through: &[],
shadow_only: &[],
celestial: &self.celestial,
stars: f
.stars
.map(|(rotation, brightness)| (Mat4::from_cols_array(&rotation), brightness)),
hand: &[],
hand_fov_degrees: f.hand_fov_degrees,
screen: &[],
pack: Default::default(),
border: None,
game_time: f.game_time,
shader_game_time: f.shader_game_time,
end_portal_sprites: f.end_portal_sprites,
crumbling_sprite: f.crumbling_sprite,
ticks: f.ticks,
darkness: f.darkness,
night_vision: f.night_vision,
block_flicker: f.block_flicker,
boss_darken: f.boss_darken,
chunk_fade: 0.0,
post_effects: crate::post_chain::Request::none(),
menu_blur: None,
}
}
}
+80 -20
View File
@@ -19,6 +19,10 @@
//! the results only sorts sections between the phases: a stale result draws
//! a hidden section in phase 1, or tests a section that is in sight.
//!
//! Far terrain tiles are tested the same way, with their meshes' own
//! bounds for a box (grown by a block too, which keeps their faces off the
//! box's), and resident slots of their own (`TILE`).
//!
//! Every solid draw is an entry of one of the two lists, so the CPU records
//! as many draws as without culling: drivers that unroll an indirect
//! multi-draw on the CPU (Mesa's on Intel Gen9) pay per entry. Phase 2's
@@ -39,6 +43,11 @@ use std::sync::{
};
const WORDS: u64 = 5 * 4;
/// A tested section's box, around its origin: its cell grown by a block.
pub const SECTION_BOX: [[f32; 3]; 2] = [[-1.0; 3], [17.0; 3]];
/// The bit that marks a far tile's slot (`Renderer::tile_cull_slot`): tiles
/// count their slots apart from the sections' resident ones.
pub const TILE: u32 = 1 << 31;
/// Phase 1's sections are each tested every `RETEST` frames.
const RETEST: u32 = 8;
/// Culling runs while the last result read back hid at least this share of
@@ -63,6 +72,17 @@ const FREE: u8 = 0;
const PENDING: u8 = 1;
const MAPPED: u8 = 2;
/// One test, as `cull.wgsl` reads it: visible index and phase 2 draws
/// (`place`), then its box's corners around the origin.
#[repr(C)]
#[derive(Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)]
struct Test {
data: [u32; 4],
low: [f32; 4],
high: [f32; 4],
}
const TEST_BYTES: u64 = std::mem::size_of::<Test>() as u64;
#[repr(C)]
#[derive(Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)]
struct Params {
@@ -131,8 +151,10 @@ pub struct Cull {
phase2_capacity: u64,
tests: wgpu::Buffer,
tests_capacity: u64,
/// This frame's tests: visible index, first phase 2 draw, phase 2 draws.
test_data: Vec<[u32; 4]>,
/// This frame's tests: visible index, then its phase 2 draws in each
/// solid pass (`place`): the first of the first pass's, both counts (the
/// second's in the high half), the first of the second pass's; and its box.
test_data: Vec<Test>,
test_slots: Vec<u32>,
test_indices: Vec<u32>,
total: u64,
@@ -142,8 +164,10 @@ pub struct Cull {
readbacks: Vec<Readback>,
next: usize,
current: Option<usize>,
/// Per resident slot: whether the last result read back saw it.
/// Per resident slot: whether the last result read back saw it; and per
/// far tile's slot (`TILE`).
seen: Vec<bool>,
seen_tiles: Vec<bool>,
stamp: u32,
/// Of the boxes the last test read back drew, how many it did not see
/// and how many it drew, and the share of solid indices hidden.
@@ -325,7 +349,7 @@ impl Cull {
),
phase2: buffer(device, "Section draws, phase 2", WORDS, PHASE2_USAGE),
phase2_capacity: 1,
tests: buffer(device, "Section tests", 16, TESTS_USAGE),
tests: buffer(device, "Section tests", TEST_BYTES, TESTS_USAGE),
tests_capacity: 1,
test_data: Vec::new(),
test_slots: Vec::new(),
@@ -347,6 +371,7 @@ impl Cull {
next: 0,
current: None,
seen: Vec::new(),
seen_tiles: Vec::new(),
stamp: 0,
hidden: ([0; 2], 1.0),
always: false,
@@ -378,11 +403,15 @@ impl Cull {
let share = indices as f32 / r.total.max(1) as f32;
self.hidden = ([hidden, results.len()], share);
for (&slot, &result) in r.slots.iter().zip(&results) {
let slot = slot as usize;
if slot >= self.seen.len() {
self.seen.resize(slot + 1, false);
let (seen, slot) = if slot & TILE != 0 {
(&mut self.seen_tiles, (slot & !TILE) as usize)
} else {
(&mut self.seen, slot as usize)
};
if slot >= seen.len() {
seen.resize(slot + 1, false);
}
self.seen[slot] = result == r.stamp;
seen[slot] = result == r.stamp;
}
}
r.buffer.unmap();
@@ -397,30 +426,61 @@ impl Cull {
!self.probe || self.stamp.is_multiple_of(PROBE)
}
/// Whether phase 1 draws the section in resident `slot`.
/// Whether phase 1 draws the section in resident `slot` (or the far tile
/// in its `TILE` slot).
pub fn first(&self, slot: u32) -> bool {
if slot & TILE != 0 {
return self
.seen_tiles
.get((slot & !TILE) as usize)
.copied()
.unwrap_or(false);
}
self.seen.get(slot as usize).copied().unwrap_or(false)
}
/// A section phase 1 draws, `index` in the visible list, with `indices`
/// solid indices: tested in turn.
pub fn drawn(&mut self, index: usize, slot: u32, indices: u32) {
/// solid indices and the box `bounds` around its origin: tested in turn.
pub fn drawn(&mut self, index: usize, slot: u32, indices: u32, bounds: [[f32; 3]; 2]) {
self.total += u64::from(indices);
if indices > 0 && (self.probe || slot.wrapping_add(self.stamp).is_multiple_of(RETEST)) {
self.push([index as u32, 0, 0, 0], slot, indices);
self.push(index, bounds, slot, indices);
}
}
/// A section left to phase 2: its `draws` from phase 2's `first`.
pub fn deferred(&mut self, index: usize, slot: u32, first: usize, draws: usize, indices: u32) {
/// A section left to phase 2, with `draws` draws there: its test, whose
/// draws `place` gives once phase 2's list is in its final order.
pub fn deferred(
&mut self,
index: usize,
slot: u32,
draws: usize,
indices: u32,
bounds: [[f32; 3]; 2],
) -> Option<u32> {
self.total += u64::from(indices);
if draws > 0 {
self.push([index as u32, first as u32, draws as u32, 0], slot, indices);
}
(draws > 0).then(|| {
self.push(index, bounds, slot, indices);
self.test_data.len() as u32 - 1
})
}
fn push(&mut self, test: [u32; 4], slot: u32, indices: u32) {
self.test_data.push(test);
/// `test`'s draws in solid pass `pass` (0 or 1): `draws` from phase 2's
/// `first`. Each pass draws its own part of the section's quads.
pub fn place(&mut self, test: u32, pass: u32, first: u32, draws: u32) {
debug_assert!(pass < 2 && draws < 1 << 16);
let t = &mut self.test_data[test as usize].data;
t[1 + 2 * pass as usize] = first;
t[2] |= draws << (16 * pass);
}
fn push(&mut self, index: usize, bounds: [[f32; 3]; 2], slot: u32, indices: u32) {
let [low, high] = bounds.map(|[x, y, z]| [x, y, z, 0.0]);
self.test_data.push(Test {
data: [index as u32, 0, 0, 0],
low,
high,
});
self.test_slots.push(slot);
self.test_indices.push(indices);
}
@@ -454,7 +514,7 @@ impl Cull {
self.tests = buffer(
device,
"Section tests",
self.tests_capacity * 16,
self.tests_capacity * TEST_BYTES,
TESTS_USAGE,
);
self.results = buffer(
+36 -20
View File
@@ -11,10 +11,19 @@ struct Globals {
view_proj: mat4x4<f32>,
}
// One test per section: its visible index (which names its origin), its
// first draw in `phase2` and how many draws it has there (0: phase 1 drew
// it, and the test only tells whether it is still in sight).
@group(0) @binding(0) var<storage, read> tests: array<vec4<u32>>;
// One test per section or far tile: its visible index (which names its
// origin), then its draws in `phase2` for each solid pass (gfx/cull.rs's
// `place`): the first pass's first draw, both passes' draw counts (the
// second's in the high 16 bits), the second pass's first draw. No draws:
// phase 1 drew it, and the test only tells whether it is still in sight.
// Then its box's lowest and highest corner around the origin (a section's:
// -1 and 17, `SECTION_BOX`).
struct Test {
data: vec4<u32>,
low: vec4<f32>,
high: vec4<f32>,
}
@group(0) @binding(0) var<storage, read> tests: array<Test>;
// Per test: the stamp of the frame whose test saw the box.
@group(0) @binding(1) var<storage, read_write> results: array<u32>;
// Phase 2's draws, 5 words each, with instance counts of 0 until seen.
@@ -36,23 +45,27 @@ struct Box {
@location(0) @interpolate(flat) test: u32,
}
fn corner(origin: vec3<f32>, c: u32) -> vec3<f32> {
fn corner(origin: vec3<f32>, low: vec3<f32>, high: vec3<f32>, c: u32) -> vec3<f32> {
return origin + vec3(
select(-1.0, 17.0, (c & 1u) != 0u),
select(-1.0, 17.0, (c & 2u) != 0u),
select(-1.0, 17.0, (c & 4u) != 0u),
select(low.x, high.x, (c & 1u) != 0u),
select(low.y, high.y, (c & 2u) != 0u),
select(low.z, high.z, (c & 4u) != 0u),
);
}
// Each tested section's box, grown by a block (block models reach one block
// out of their cell), drawn after phase 1 against its depth with back faces
// culled: a front face fragment that passes the depth test is the box's
// nearest point on that pixel in front of phase 1's depth, so the section
// may show there. A box failing everywhere would have every fragment of its
// section fail the depth test against the final depth, which is only nearer.
// Each tested section's or far tile's box, grown by a block (block models
// reach one block out of their cell), drawn after phase 1 against its depth
// with back faces culled: a front face fragment that passes the depth test
// is the box's nearest point on that pixel in front of phase 1's depth, so
// the section may show there. A box failing everywhere would have every
// fragment of its section fail the depth test against the final depth,
// which is only nearer.
@vertex
fn vs_box(@builtin(vertex_index) v: u32, @builtin(instance_index) t: u32) -> Box {
let origin = origins[tests[t].x].xyz;
let test = tests[t];
let origin = origins[test.data.x].xyz;
let low = test.low.xyz;
let high = test.high.xyz;
var out: Box;
out.test = t;
// The box's screen rectangle, from the corners in front of the camera.
@@ -60,7 +73,7 @@ fn vs_box(@builtin(vertex_index) v: u32, @builtin(instance_index) t: u32) -> Box
var hi = vec2(-1e30);
var behind = false;
for (var c = 0u; c < 8u; c++) {
let p = globals.view_proj * vec4(corner(origin, c), 1.0);
let p = globals.view_proj * vec4(corner(origin, low, high, c), 1.0);
behind = behind || p.w <= 0.0;
let q = p.xy / max(p.w, 1e-6);
lo = min(lo, q);
@@ -71,7 +84,7 @@ fn vs_box(@builtin(vertex_index) v: u32, @builtin(instance_index) t: u32) -> Box
// clips its front faces away, and a box over a large part of the screen
// is nearly always in sight and costly to test: both count as seen,
// through a small triangle in the top left corner at the nearest depth.
let near = all(origin < vec3(2.0)) && all(origin > vec3(-18.0));
let near = all(origin < vec3(1.0) - low) && all(origin > vec3(-1.0) - high);
if near || (!behind && size.x * size.y > params.big * 4.0) {
var p = vec2(-1.0, 1.0);
if v == 1u {
@@ -82,7 +95,7 @@ fn vs_box(@builtin(vertex_index) v: u32, @builtin(instance_index) t: u32) -> Box
out.position = select(vec4(0.0, 0.0, 0.0, 1.0), vec4(p, 1.0, 1.0), v < 3u);
return out;
}
out.position = globals.view_proj * vec4(corner(origin, CORNERS[v]), 1.0);
out.position = globals.view_proj * vec4(corner(origin, low, high, CORNERS[v]), 1.0);
return out;
}
@@ -91,10 +104,13 @@ fn vs_box(@builtin(vertex_index) v: u32, @builtin(instance_index) t: u32) -> Box
fn see(t: u32) {
if results[t] != params.stamp {
results[t] = params.stamp;
let test = tests[t];
for (var k = 0u; k < test.z; k++) {
let test = tests[t].data;
for (var k = 0u; k < (test.z & 0xffffu); k++) {
phase2[(test.y + k) * 5u + 1u] = 1u;
}
for (var k = 0u; k < (test.z >> 16u); k++) {
phase2[(test.w + k) * 5u + 1u] = 1u;
}
}
}
+158 -53
View File
@@ -42,8 +42,9 @@ struct Plan {
solid_calls: usize,
/// Where the shadow camera's solid and translucent calls begin.
shadow_calls: [usize; 2],
/// Where Metal's opaque pass ends and its cutout pass begins in phase 1's calls.
pass_calls: [usize; 2],
/// Where Metal's opaque pass ends and its cutout pass begins in phase 1's calls,
/// and where its cutout pass begins in phase 2's.
pass_calls: [usize; 3],
total: u64,
}
const QUADS: u32 = u32::MAX;
@@ -53,10 +54,15 @@ const GROUP_LIMIT: u32 = 65535;
/// below it. A call names its key: its vertices come from that arena's page.
pub const TRANSLUCENT_KEYS: u32 = 1 << 10;
/// terrain.wgsl's `arena_page`: the page the solid draws read their vertices from.
pub const ARENA_BINDING: u32 = 19;
struct PageTable {
/// Section id of every block of the page.
blocks: wgpu::Buffer,
group: Option<wgpu::BindGroup>,
/// The section arena's page `group` binds at `ARENA_BINDING` (`bind_pages`).
arena: Option<wgpu::Buffer>,
}
/// Writes the fragment's alpha over the frame's and leaves its colour.
@@ -81,8 +87,9 @@ pub struct Flat {
/// The solid draws in one pass (`fs_solid`), where the GPU doesn't hide pixels
/// by tiles (`split_solid` in `Renderer::draw_frame`: elsewhere than Metal).
pub solid: wgpu::RenderPipeline,
/// The solid draws in two passes over the same draws (terrain.wgsl's `opaque_quad`):
/// the quads with no cutout first, through a shader that never discards, then the rest.
/// The solid draws in two passes, each over its own part of the draws (terrain.wgsl's
/// `opaque_quad`): the quads with no cutout first, through a shader that never discards,
/// then the rest.
pub solid_opaque: wgpu::RenderPipeline,
pub solid_cutout: wgpu::RenderPipeline,
/// The solid draws as the water mirror's camera draws them (`fs_solid_mirror`).
@@ -128,8 +135,9 @@ pub struct Flat {
pub phase1_calls: usize,
pub solid_calls: usize,
/// Metal's two solid passes over phase 1: the opaque one draws
/// `calls[..pass_calls[0]]`, the cutout one `calls[pass_calls[1]..phase1_calls]`.
pub pass_calls: [usize; 2],
/// `calls[..pass_calls[0]]`, the cutout one `calls[pass_calls[1]..phase1_calls]`;
/// over phase 2, `calls[phase1_calls..pass_calls[2]]` and the rest.
pub pass_calls: [usize; 3],
/// Where a shader pack's shadow camera's solid and translucent calls
/// begin (`calls.len()` without them): the camera's translucent calls
/// end at the first.
@@ -137,6 +145,10 @@ pub struct Flat {
/// Frames with fewer sections in view keep the per-section draws.
pub min_sections: usize,
range_align: u64,
/// Phase 2's calls draw their page key as their first instance, as `draw_paged` does:
/// the visibility buffer's ID pass (`visbuffer`) reads it. The other flat pipelines
/// have no instance-rate inputs.
pub page_instances: bool,
}
/// Sections in view (and distant tiles) from which a frame is drawn flat.
@@ -247,7 +259,8 @@ fn buffer(
/// instead of a destination: the call's room holds all of its draws. Draws
/// from `shadow[0]` (solid) and `shadow[1]` (translucent) on are a shader
/// pack's shadow camera's, with calls of their own. Phase 1's draws before
/// `passes[0]` and from `passes[1]` on, the two solid passes' on Metal, too.
/// `passes[0]` and from `passes[1]` on, the two solid passes' on Metal, too,
/// and phase 2's from `passes[2]` on (its cutout pass's).
#[allow(clippy::too_many_arguments)]
fn plan(
draws: &[[u32; 5]],
@@ -255,7 +268,7 @@ fn plan(
phase1_draws: usize,
solid_draws: usize,
shadow: [usize; 2],
passes: [usize; 2],
passes: [usize; 3],
align: u64,
key: impl Fn(u32, Option<u32>) -> u32,
calls: &mut Vec<Call>,
@@ -267,7 +280,7 @@ fn plan(
segments.clear();
let (mut phase1_calls, mut solid_calls) = (None, None);
let mut shadow_calls = [None; 2];
let mut pass_calls = [None; 2];
let mut pass_calls = [None; 3];
let mut total = 0u64;
let mut by_source: Vec<(Source, Vec<Range>)> = Vec::new();
for (i, (d, &(page, sorted))) in draws.iter().zip(pages).enumerate() {
@@ -329,14 +342,22 @@ fn plan(
phase1_calls,
solid_calls,
shadow_calls: shadow_calls.map(|c| c.unwrap_or(calls.len())),
pass_calls: pass_calls.map(|c| c.unwrap_or(calls.len()).min(phase1_calls)),
pass_calls: {
let [opaque, cutout, phase2] = pass_calls.map(|c| c.unwrap_or(calls.len()));
[
opaque.min(phase1_calls),
cutout.min(phase1_calls),
phase2.clamp(phase1_calls, solid_calls),
]
},
total,
}
}
impl Flat {
/// `pipeline(layout, label, vertex entry, fragment entry, blend, cull)` builds a
/// terrain pipeline as the per-section ones, without the origin buffer.
/// `pipeline(layout, label, vertex entry, fragment entry, blend, cull, pulled)` builds a
/// terrain pipeline as the per-section ones, without the origin buffer, and without
/// vertex buffers when `pulled` (its vertex shader reads the page, `ARENA_BINDING`).
pub fn new(
device: &wgpu::Device,
terrain_layout: &wgpu::BindGroupLayout,
@@ -349,13 +370,18 @@ impl Flat {
&str,
Option<wgpu::BlendState>,
Option<wgpu::Face>,
bool,
) -> wgpu::RenderPipeline,
) -> Self {
let vertex = wgpu::ShaderStages::VERTEX;
let compute = wgpu::ShaderStages::COMPUTE;
let draw_layout = device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
label: Some("Flat section draws"),
entries: &[storage(0, vertex, true), storage(1, vertex, true)],
entries: &[
storage(0, vertex, true),
storage(1, vertex, true),
storage(ARENA_BINDING, vertex, true),
],
});
let layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
label: Some("Flat terrain layout"),
@@ -404,38 +430,44 @@ impl Flat {
let storage_usage = wgpu::BufferUsages::STORAGE;
let back = Some(wgpu::Face::Back);
Self {
// The solid draws read either layout of the solid quads (`mesher::packed`) from
// the page; translucent ones keep their vertex buffer.
solid: pipeline(
&layout,
"Terrain solid (flat)",
"vs_terrain_flat",
"vs_section_flat",
"fs_solid",
None,
back,
true,
),
solid_opaque: pipeline(
&layout,
"Terrain solid opaque (flat)",
"vs_terrain_flat_opaque",
"vs_section_flat_opaque",
"fs_opaque",
None,
back,
true,
),
solid_cutout: pipeline(
&layout,
"Terrain solid cutout (flat)",
"vs_terrain_flat_cutout",
"vs_section_flat_cutout",
"fs_solid",
None,
back,
true,
),
// The mirror flips the winding: its solid terrain culls the front.
solid_mirror: pipeline(
&layout,
"Terrain solid mirrored (flat)",
"vs_terrain_flat",
"vs_section_flat",
"fs_solid_mirror",
None,
Some(wgpu::Face::Front),
true,
),
translucent: pipeline(
&layout,
@@ -444,6 +476,7 @@ impl Flat {
"fs_translucent",
Some(wgpu::BlendState::ALPHA_BLENDING),
back,
false,
),
translucent_mark: pipeline(
&layout,
@@ -452,6 +485,7 @@ impl Flat {
"fs_translucent_mark",
Some(ALPHA_ONLY),
back,
false,
),
flatten,
compute_layout,
@@ -490,11 +524,12 @@ impl Flat {
calls: Vec::new(),
phase1_calls: 0,
solid_calls: 0,
pass_calls: [0; 2],
pass_calls: [0; 3],
shadow_calls: [0; 2],
min_sections,
range_align: (u64::from(device.limits().min_storage_buffer_offset_alignment) / 16)
.max(1),
page_instances: false,
}
}
/// A section uploaded to `vertices` vertices from `start` of the page keyed `page`:
@@ -539,13 +574,15 @@ impl Flat {
self.pages.resize_with(page + 1, || None);
}
let table = self.pages[page].get_or_insert_with(|| PageTable {
// Copied whole into the visibility buffer's table of every page (`visbuffer`).
blocks: buffer(
device,
"Section ids by block",
blocks * 4,
wgpu::BufferUsages::STORAGE,
wgpu::BufferUsages::STORAGE | wgpu::BufferUsages::COPY_SRC,
),
group: None,
arena: None,
});
let first = start / GRAIN;
let ids = vec![id; vertices.div_ceil(GRAIN) as usize];
@@ -606,7 +643,7 @@ impl Flat {
phase1_draws: usize,
solid_draws: usize,
shadow: [usize; 2],
passes: [usize; 2],
passes: [usize; 3],
phase2: Option<&wgpu::Buffer>,
translucent_arena: bool,
origins: impl Iterator<Item = (u32, [f32; 4])>,
@@ -680,7 +717,7 @@ impl Flat {
self.phase1_calls = 0;
self.solid_calls = 0;
self.shadow_calls = [0; 2];
self.pass_calls = [0; 2];
self.pass_calls = [0; 3];
return false;
}
if self.range_data.len() as u64 > self.range_capacity {
@@ -709,10 +746,11 @@ impl Flat {
);
// Phase 2's calls start empty, each at the start of its room.
self.phase2_call_data.clear();
let page_instances = self.page_instances;
self.phase2_call_data.extend(
self.calls[phase1_calls..solid_calls]
.iter()
.map(|c| [0, 1, c.first, 0, 0]),
.map(|c| [0, 1, c.first, 0, if page_instances { c.page } else { 0 }]),
);
let phase2_calls = self.phase2_call_data.len() as u64;
if phase2_calls > self.phase2_call_capacity {
@@ -807,29 +845,53 @@ impl Flat {
pass.dispatch_workgroups((*count).min(GROUP_LIMIT), count.div_ceil(GROUP_LIMIT), 1);
}
drop(pass);
for page in self.calls.iter().map(|c| c.page) {
let table = self.pages[page as usize]
.as_mut()
.expect("a drawn page has its block table");
if table.group.is_none() {
table.group = Some(device.create_bind_group(&wgpu::BindGroupDescriptor {
label: Some("Flat section draws"),
layout: &self.draw_layout,
entries: &[
wgpu::BindGroupEntry {
binding: 0,
resource: table.blocks.as_entire_binding(),
},
wgpu::BindGroupEntry {
binding: 1,
resource: self.origins.as_entire_binding(),
},
],
}));
}
}
true
}
/// Gives every page table its bind group (`bind_page`): its blocks, the origins and, for
/// a page of the section arena, that page (`arena`, by page) for the solid draws to read.
/// Before each frame's draws, flat or not: the per-section solid draws bind the groups too
/// (`page_group`), and a page that grew is another buffer.
pub fn bind_pages<'a>(
&mut self,
device: &wgpu::Device,
arena: impl Fn(u32) -> Option<&'a wgpu::Buffer>,
) {
for (key, slot) in self.pages.iter_mut().enumerate() {
let Some(table) = slot else {
continue;
};
let page = (key < TRANSLUCENT_KEYS as usize)
.then(|| arena(key as u32))
.flatten();
if table.group.is_some() && table.arena.as_ref() == page {
continue;
}
table.arena = page.cloned();
table.group = Some(device.create_bind_group(&wgpu::BindGroupDescriptor {
label: Some("Flat section draws"),
layout: &self.draw_layout,
entries: &[
wgpu::BindGroupEntry {
binding: 0,
resource: table.blocks.as_entire_binding(),
},
wgpu::BindGroupEntry {
binding: 1,
resource: self.origins.as_entire_binding(),
},
wgpu::BindGroupEntry {
binding: ARENA_BINDING,
resource: page.unwrap_or(&self.empty).as_entire_binding(),
},
],
}));
}
}
/// The bind group of the section arena's page `page` (`bind_pages`), which the solid
/// draws read their vertices through.
pub fn page_group(&self, page: u32) -> Option<&wgpu::BindGroup> {
self.pages.get(page as usize)?.as_ref()?.group.as_ref()
}
/// After occlusion culling's test: copies the phase 2 draws it saw.
pub fn flatten_phase2(
&self,
@@ -879,6 +941,46 @@ impl Flat {
pass.draw_indexed(call.first..call.first + call.count, 0, 0..1);
}
}
/// `draw`, each call as the instance its page key names: the visibility buffer's ID
/// pass (`visbuffer`) tells the pages apart by it.
pub(super) fn draw_paged<'a>(
&self,
pass: &mut wgpu::RenderPass<'_>,
calls: &[Call],
vertices: impl Fn(u32) -> wgpu::BufferSlice<'a>,
) {
pass.set_index_buffer(self.indices.slice(..), wgpu::IndexFormat::Uint32);
for call in calls {
self.bind_page(pass, call.page, &vertices);
pass.draw_indexed(
call.first..call.first + call.count,
0,
call.page..call.page + 1,
);
}
}
/// Bytes of its buffers: the index list, ranges, origins and block tables.
pub fn bytes(&self) -> u64 {
let tables: u64 = self.pages.iter().flatten().map(|t| t.blocks.size()).sum();
self.indices.size()
+ self.ranges.size()
+ self.origins.size()
+ self.phase2_calls.size()
+ tables
}
/// The origins by section id, which the visibility buffer's resolve (`visbuffer`) reads
/// in its fragment shader.
pub(super) fn origins(&self) -> &wgpu::Buffer {
&self.origins
}
/// The block table of the section arena's page `page` (`blocks_per_page` entries), which
/// the visibility buffer copies into its table of every page.
pub(super) fn block_table(&self, page: u32) -> Option<&wgpu::Buffer> {
Some(&self.pages.get(page as usize)?.as_ref()?.blocks)
}
pub(super) fn blocks_per_page(&self) -> u64 {
self.blocks_per_page
}
/// Draws `calls` without their index buffer, `instances` times: a shader pack's geometry
/// stage reads the indices itself (`hz_indices`) and stands for one emitted triangle per
/// instance.
@@ -896,19 +998,22 @@ impl Flat {
pass.draw(call.first..call.first + call.count, 0..instances);
}
}
/// Draws phase 2's calls, as `flatten_phase2` left them.
/// Draws phase 2's `calls` (`calls[phase1_calls..solid_calls]` counted from 0), as
/// `flatten_phase2` left them.
pub fn draw_phase2<'a>(
&self,
pass: &mut wgpu::RenderPass<'_>,
calls: std::ops::Range<usize>,
vertices: impl Fn(u32) -> wgpu::BufferSlice<'a>,
) {
pass.set_index_buffer(self.indices.slice(..), wgpu::IndexFormat::Uint32);
for (k, call) in self.calls[self.phase1_calls..self.solid_calls]
let first = self.phase1_calls + calls.start;
for (k, call) in self.calls[first..self.phase1_calls + calls.end]
.iter()
.enumerate()
{
self.bind_page(pass, call.page, &vertices);
pass.draw_indexed_indirect(&self.phase2_calls, k as u64 * 20);
pass.draw_indexed_indirect(&self.phase2_calls, (calls.start + k) as u64 * 20);
}
}
fn bind_page<'a>(
@@ -968,7 +1073,7 @@ mod tests {
solid,
solid,
[draws.len(); 2],
[draws.len(), 0],
[draws.len(), 0, solid],
4,
|page, _| page,
&mut calls,
@@ -1017,14 +1122,14 @@ mod tests {
solid,
solid,
[draws.len(); 2],
[3, 1],
[3, 1, solid],
4,
|page, _| page,
&mut calls,
&mut ranges,
&mut segments,
);
assert_eq!((plan.pass_calls, plan.solid_calls), ([3, 1], 4));
assert_eq!((plan.pass_calls, plan.solid_calls), ([3, 1, 4], 4));
let call = |page, first, count| Call { page, first, count };
assert_eq!(
calls,
@@ -1053,7 +1158,7 @@ mod tests {
solid,
solid,
[camera, camera + 2],
[camera, 0],
[camera, 0, solid],
4,
|page, _| page,
&mut calls,
@@ -1082,7 +1187,7 @@ mod tests {
2,
solid,
[draws.len(); 2],
[draws.len(), 0],
[draws.len(), 0, solid],
4,
|page, _| page,
&mut calls,
@@ -1095,7 +1200,7 @@ mod tests {
phase1_calls: 1,
solid_calls: 3,
shadow_calls: [4, 4],
pass_calls: [1, 0],
pass_calls: [1, 0, 3],
total: 6 * 13
}
);
@@ -1200,7 +1305,7 @@ mod tests {
phase1,
solid,
[draws.len(); 2],
[draws.len(), 0],
[draws.len(), 0, solid],
align,
|page, _| page,
&mut calls,
@@ -914,14 +914,23 @@ impl GpuCulling {
}
/// The kept sections' solid draws, a count draw per page, with the quad
/// indices bound. Leaves the origins at vertex slot 1.
pub fn draw(&self, pass: &mut wgpu::RenderPass<'_>, arena: &Arena) {
/// indices bound. Leaves the origins at vertex slot 1. `group`: the page's group 1 for
/// pipelines that read the page themselves (`Flat::page_group`), else none.
pub fn draw<'a>(
&self,
pass: &mut wgpu::RenderPass<'_>,
arena: &Arena,
group: impl Fn(u32) -> Option<&'a wgpu::BindGroup>,
) {
if self.pages.is_empty() {
return;
}
pass.set_vertex_buffer(1, self.origins.buffer.slice(..));
for &(page, first, size) in &self.pages {
pass.set_vertex_buffer(0, arena.buffer(page).slice(..));
if let Some(group) = group(page) {
pass.set_bind_group(1, group, &[]);
}
pass.multi_draw_indexed_indirect_count(
&self.draws.buffer,
u64::from(first) * 20,
@@ -2214,7 +2223,7 @@ struct Quad {
});
pass.set_pipeline(&pipeline);
pass.set_index_buffer(indices.slice(..), wgpu::IndexFormat::Uint32);
gpu.draw(&mut pass, &arena);
gpu.draw(&mut pass, &arena, |_| None);
drop(pass);
encoder.copy_texture_to_buffer(
target.as_image_copy(),
@@ -0,0 +1,223 @@
//! Every render pipeline's stage interface against the weakest GPUs' limit (#8195).
//!
//! OpenGL 3.3 drivers (a GeForce 9100M G) allow `max_inter_stage_shader_variables` = 15, and wgpu
//! counts the fragment stage's built-in inputs (`front_facing`, `sample_index`, ...) against it.
//! A pipeline over that limit panics at start-up on such a GPU, with no way to run the game, so
//! this checks the shaders with naga, without a GPU.
use std::path::{Path, PathBuf};
/// `Limits::downlevel_defaults().max_inter_stage_shader_variables`, the least a GPU offers.
const LIMIT: u32 = 15;
/// One entry point's variables: the user-defined `@location`s and the built-ins wgpu counts.
#[derive(Debug, PartialEq, Eq)]
struct Interface {
entry: String,
/// Vertex outputs or fragment inputs, user-defined.
user: u32,
/// The fragment stage's `front_facing`, `sample_index`, `sample_mask` and `primitive_index`
/// inputs, which wgpu counts as one variable each; 0 for a vertex stage.
built_ins: u32,
}
impl Interface {
fn total(&self) -> u32 {
self.user + self.built_ins
}
}
/// The bindings an argument or a result carries, a struct's members flattened.
fn bindings(
module: &naga::Module,
binding: &Option<naga::Binding>,
ty: naga::Handle<naga::Type>,
) -> Vec<naga::Binding> {
if let Some(binding) = binding {
return vec![binding.clone()];
}
match &module.types[ty].inner {
naga::TypeInner::Struct { members, .. } => {
members.iter().filter_map(|m| m.binding.clone()).collect()
}
_ => Vec::new(),
}
}
fn is_location(binding: &naga::Binding) -> bool {
matches!(binding, naga::Binding::Location { .. })
}
/// The stage interface of every vertex and fragment entry point of `source`.
fn interfaces(source: &str) -> Vec<Interface> {
let module = naga::front::wgsl::parse_str(source).unwrap();
let mut out = Vec::new();
for entry in &module.entry_points {
let function = &entry.function;
let (user, built_ins) = match entry.stage {
naga::ShaderStage::Vertex => {
let outputs: Vec<_> = function
.result
.iter()
.flat_map(|r| bindings(&module, &r.binding, r.ty))
.collect();
(outputs.iter().filter(|b| is_location(b)).count(), 0)
}
naga::ShaderStage::Fragment => {
let inputs: Vec<_> = function
.arguments
.iter()
.flat_map(|a| bindings(&module, &a.binding, a.ty))
.collect();
let built_ins = inputs
.iter()
.filter(|b| {
matches!(
b,
naga::Binding::BuiltIn(
naga::BuiltIn::FrontFacing
| naga::BuiltIn::SampleIndex
| naga::BuiltIn::SampleMask
| naga::BuiltIn::PrimitiveIndex
)
)
})
.count();
(inputs.iter().filter(|b| is_location(b)).count(), built_ins)
}
_ => continue,
};
out.push(Interface {
entry: entry.name.clone(),
user: user as u32,
built_ins: built_ins as u32,
});
}
out
}
/// The shaders as the renderer assembles them, by the `.wgsl` files each is made of.
fn composed() -> Vec<(&'static str, Vec<&'static str>, String)> {
let entity = crate::overlay::wgsl_constants() + include_str!("../entity.wgsl");
vec![
("entity", vec!["entity.wgsl"], entity.clone()),
(
"static entity",
vec!["entity.wgsl", "static_entity.wgsl"],
entity.clone() + include_str!("../static_entity.wgsl"),
),
(
"improved transparency clouds",
vec!["entity.wgsl", "oit.wgsl", "oit_clouds.wgsl"],
entity.clone() + include_str!("../oit.wgsl") + include_str!("../oit_clouds.wgsl"),
),
(
"improved transparency features",
vec!["entity.wgsl", "oit.wgsl", "oit_features.wgsl"],
entity + include_str!("../oit.wgsl") + include_str!("../oit_features.wgsl"),
),
(
"improved transparency world",
vec!["terrain.wgsl", "oit.wgsl", "oit_world.wgsl"],
include_str!("../terrain.wgsl").to_owned()
+ include_str!("../oit.wgsl")
+ include_str!("../oit_world.wgsl"),
),
(
"visibility buffer",
vec!["terrain.wgsl", "visbuffer.wgsl"],
include_str!("../terrain.wgsl").to_owned() + include_str!("../visbuffer.wgsl"),
),
(
"improved transparency world border",
vec!["border.wgsl", "oit.wgsl", "oit_border.wgsl"],
include_str!("../border.wgsl").to_owned()
+ include_str!("../oit.wgsl")
+ include_str!("../oit_border.wgsl"),
),
]
}
fn wgsl_files(dir: &Path, out: &mut Vec<PathBuf>) {
for entry in std::fs::read_dir(dir).unwrap().flatten() {
let path = entry.path();
if path.is_dir() {
wgsl_files(&path, out);
} else if path.extension().is_some_and(|e| e == "wgsl") {
out.push(path);
}
}
}
/// Every shader: the assembled ones, and each `.wgsl` file that stands alone. A file that does
/// not (it needs another's declarations) must be part of an assembled one, so that a new shader
/// cannot slip past the audit.
fn audited() -> Vec<(String, Vec<Interface>)> {
let composed = composed();
let mut files = Vec::new();
wgsl_files(
&Path::new(env!("CARGO_MANIFEST_DIR")).join("src"),
&mut files,
);
files.sort();
let mut out: Vec<(String, Vec<Interface>)> = composed
.iter()
.map(|(name, _, source)| ((*name).to_owned(), interfaces(source)))
.collect();
for file in files {
let name = file.file_name().unwrap().to_string_lossy().into_owned();
let source = std::fs::read_to_string(&file).unwrap();
let alone = naga::front::wgsl::parse_str(&source).is_ok();
let part = composed.iter().any(|(_, parts, _)| parts.contains(&&*name));
assert!(
alone || part,
"{name} needs other files' declarations: add its assembly to `composed`"
);
if alone {
out.push((name, interfaces(&source)));
}
}
out
}
#[test]
fn no_pipeline_exceeds_the_weakest_gpus_inter_stage_limit() {
let mut over = Vec::new();
for (shader, entries) in audited() {
for e in entries {
if e.total() > LIMIT {
over.push(format!(
"{shader}::{}: {} user-defined + {} built-in = {} > {LIMIT}",
e.entry,
e.user,
e.built_ins,
e.total()
));
}
}
}
assert!(over.is_empty(), "over the limit:\n{}", over.join("\n"));
}
/// The audit counts what wgpu counts (the failure of #8195: 15 user-defined + `FrontFacing`).
#[test]
fn a_front_facing_input_counts_against_the_limit() {
let source = "struct Io { @builtin(position) p: vec4<f32>, @location(0) a: vec4<f32>, @location(1) b: f32 }
@vertex fn vs() -> Io { return Io(vec4<f32>(0.0), vec4<f32>(0.0), 0.0); }
@fragment fn fs(in: Io, @builtin(front_facing) f: bool) -> @location(0) vec4<f32> { return in.a; }";
assert_eq!(
interfaces(source),
vec![
Interface {
entry: "vs".into(),
user: 2,
built_ins: 0
},
Interface {
entry: "fs".into(),
user: 2,
built_ins: 1
},
]
);
}
@@ -63,6 +63,9 @@ pub(super) struct Tile {
/// place until they have faded in (from the job's end, the instant), so
/// no hole shows through them.
previous: Option<(SectionGpu, Option<Instant>)>,
/// Its slot in occlusion culling's results (`cull::TILE`), kept while
/// meshes of the same tile replace one another.
pub cull_slot: u32,
}
/// How long a tile takes to fade in over the ones it replaces.
@@ -160,6 +163,18 @@ impl Tile {
None => &mut self.mesh,
}
}
/// The box occlusion culling tests (`cull::Cull`), around its origin: its
/// mesh's bounds grown by a block, while that mesh is the one drawn
/// whole (no stand-in, no fade). A fading tile's dither moves its depth
/// toward the camera (terrain.wgsl's `fade_depth`), out of the box.
pub fn cull_bounds(&self, fade: u32) -> Option<[[f32; 3]; 2]> {
(fade == 0 && self.previous.is_none()).then(|| {
[
(self.bounds.min - 1.0).to_array(),
(self.bounds.max + 1.0).to_array(),
]
})
}
/// Both meshes it holds in the arena: its own and the stand-in, if any.
pub fn meshes_mut(&mut self) -> impl Iterator<Item = &mut SectionGpu> {
std::iter::once(&mut self.mesh).chain(self.previous.as_mut().map(|(mesh, _)| mesh))
@@ -192,6 +207,10 @@ impl Renderer {
/// its old mesh stands in while they fade in. A new one waits for the rest of its job
/// (`upload_lods`), then fades in.
pub fn upload_lod(&mut self, key: TileKey, mesh: &SectionMesh, keep: bool) {
if let Some(copies) = &mut self.capture_copies {
copies.tile(key, mesh);
}
let old_slot = self.lods.get(&key).map(|tile| tile.cull_slot);
let (shown, previous) = match self.lods.remove(&key) {
Some(old) if old.dying.is_none() => match old.previous {
Some(previous) => {
@@ -212,6 +231,12 @@ impl Renderer {
};
match Bounds::mesh(mesh).zip(self.upload_mesh(mesh)) {
Some((bounds, mesh)) => {
let cull_slot = old_slot.unwrap_or_else(|| {
self.lod_cull_free.pop().unwrap_or_else(|| {
self.lod_cull_next += 1;
self.lod_cull_next - 1
})
});
self.lods.insert(
key,
Tile {
@@ -221,6 +246,7 @@ impl Renderer {
dying: None,
alone: false,
previous,
cull_slot,
},
);
}
@@ -228,6 +254,7 @@ impl Renderer {
if let Some((previous, _)) = previous {
self.release_mesh(previous);
}
self.lod_cull_free.extend(old_slot);
}
}
}
@@ -240,12 +267,19 @@ impl Renderer {
}
pub fn remove_lod(&mut self, key: TileKey) {
if let Some(copies) = &mut self.capture_copies {
copies.forget_tile(key);
}
if let Some(tile) = self.lods.remove(&key) {
self.lod_cull_free.push(tile.cull_slot);
self.release_tile(tile);
}
}
pub fn clear_lods(&mut self) {
if let Some(copies) = &mut self.capture_copies {
copies.clear_tiles();
}
self.lod_pending = None;
// No far terrain left to fade out over.
for (key, since) in std::mem::take(&mut self.lod_leaving) {
@@ -260,6 +294,8 @@ impl Renderer {
for (_, tile) in std::mem::take(&mut self.lods) {
self.release_tile(tile);
}
self.lod_cull_free.clear();
self.lod_cull_next = 0;
self.set_lod_cutout(Default::default());
}
@@ -437,6 +473,15 @@ impl Renderer {
}
}
/// The tiles drawn for good, not fading out (`render-capture`).
pub(super) fn standing_lods(&self) -> FxHashSet<TileKey> {
self.lods
.iter()
.filter(|(_, tile)| tile.dying.is_none())
.map(|(&key, _)| key)
.collect()
}
/// The chunk columns the resident tiles now leave out (`Lod::take_cutout`).
/// Removed sections they no longer leave out are released.
pub fn set_lod_cutout(&mut self, cutout: crate::fast_hash::FxHashSet<(i32, i32)>) {
@@ -6,7 +6,7 @@ use horizon_shader_api::{Report, StageKind};
use super::displace::Displacement;
use super::native_material::{DisplacedShape, NativeMaterial, TerrainShape};
use super::native_post::{NativeFrame, NativePost};
use super::native_shadow::NativeShadow;
use super::native_shadow::{NativeShadow, ShadowGrid};
use super::native_sky::NativeSky;
use super::pack_timing::PassTiming;
@@ -94,13 +94,33 @@ impl NativePack {
.max(1);
let steps =
d.steps_option.is_some() && option_on(constants, d.steps_option.as_ref());
Displacement::new(device, d.distance, cells, steps, &frame.pbr[0], false)
Displacement::new(
device,
d.distance,
cells,
steps,
&frame.pbr[0],
report.shadow.is_some(),
)
});
let shadow = report
.shadow
.as_ref()
.map(|s| {
let vertex = report.stages.iter().find(|s| s.kind == StageKind::Vertex);
// `[displacement]`'s grid casts too, from the material's module.
let material = report.stages.iter().find(|s| s.kind == StageKind::Material);
let grid = displacement.as_ref().and_then(|d| {
let picks = d.shadow.as_ref()?;
Some(ShadowGrid {
distance: d.distance,
cells: picks.cells,
steps: picks.steps,
material: material?,
layout: &d.draw_layout,
normals: &frame.pbr[0],
})
});
NativeShadow::new(
device,
terrain,
@@ -108,6 +128,7 @@ impl NativePack {
&s.solid_materials,
vertex,
constants,
grid,
)
})
.transpose()?;
@@ -23,6 +23,9 @@ struct HorizonShadowOut {
@location(1) @interpolate(flat) layer: u32,
@location(2) tint: vec3<f32>,
@location(3) @interpolate(flat) fluid: u32,
// The point on the flat face, camera-relative (`[displacement]`'s grid takes it over near
// the camera).
@location(4) base: vec3<f32>,
}
// `color` is the vertex colour: the tint, and the fluid flag in its alpha's high nibble
// (mesher.rs's `fluid_face`).
@@ -37,6 +40,7 @@ fn horizon_shadow_vertex(pos: vec3<f32>, uv: vec2<f32>, layer: u32, color: vec4<
out.tint = color.rgb;
let high = u32(round(color.a * 255.0)) >> 4u;
out.fluid = u32(high >= 8u && (high & 7u) < 6u);
out.base = pos;
return out;
}
@vertex fn horizon_shadow_vs(
@@ -58,6 +62,10 @@ fn horizon_shadow_vertex(pos: vec3<f32>, uv: vec2<f32>, layer: u32, color: vec4<
return horizon_shadow_vertex(pos, atlas, layer, color);
}
@fragment fn horizon_shadow_fs(in: HorizonShadowOut) {
if horizon_shadow_taken(in.base, in.layer) { discard; }
horizon_shadow_cutout(in);
}
fn horizon_shadow_cutout(in: HorizonShadowOut) {
// Bit 15 of the layer marks opaque leaves (forceOpaque): no alpha cutout.
let alpha = horizon_terrain_sprite(in.uv, in.layer & 0x7fffu).a;
if alpha < 0.5 && (in.layer & 0x8000u) == 0u && !horizon_shadow_solid(in.layer & 0x7fffu) { discard; }
@@ -105,6 +113,45 @@ struct HorizonEntityShadowOut {
}
";
/// No `[displacement]` grid: the flat terrain casts everywhere.
const UNTAKEN: &str = "
fn horizon_shadow_taken(base: vec3<f32>, layer: u32) -> bool {
return false;
}
";
/// `[displacement]`'s grid in the shadow map (gfx/displace.rs), cast in the flat quads' place.
/// The height maps join the pass's frame group.
const GRID_ENTRIES: &str = "
@group(3) @binding(12) var horizon_pbr_normals: texture_2d_array<f32>;
fn horizon_shadow_taken(base: vec3<f32>, layer: u32) -> bool {
return length(base) < horizon_displace_distance - 0.05 && horizon_displaced_layer(layer);
}
@vertex fn horizon_shadow_vs_displaced(@builtin(vertex_index) v: u32,
@builtin(instance_index) instance: u32) -> HorizonShadowOut {
let p = horizon_displace_point(v, instance);
var out = horizon_shadow_vertex(p.position, p.uv, p.layer, p.color);
out.base = p.base;
return out;
}
@fragment fn horizon_shadow_fs_displaced(in: HorizonShadowOut) {
if length(in.base) >= horizon_displace_distance + 0.05 { discard; }
horizon_shadow_cutout(in);
}
";
/// What the shadow pass's grid is built from: `[displacement]`'s values, the material stage
/// (whose module holds `displacement` and the vertex stage), group 1's layout and the height
/// maps.
pub struct ShadowGrid<'a> {
pub distance: f32,
pub cells: u32,
pub steps: bool,
pub material: &'a horizon_shader_api::check::CheckedStage,
pub layout: &'a wgpu::BindGroupLayout,
pub normals: &'a wgpu::TextureView,
}
/// `shadow_color`'s format.
const SHADOW_COLOR: wgpu::TextureFormat = wgpu::TextureFormat::Rgba8Unorm;
@@ -326,6 +373,8 @@ pub struct NativeShadow {
/// The entities' draw, with the entities' group 0 (`ENTITY_ENTRIES`).
pub entity: wgpu::RenderPipeline,
pub group: wgpu::BindGroup,
/// `[displacement]`'s grid (gfx/displace.rs's shadow list).
pub displaced: Option<wgpu::RenderPipeline>,
}
/// The entity draw's shader.
@@ -418,17 +467,36 @@ fn shadow_solid(materials: &[(u32, u32)], solid: &[u32]) -> String {
}
/// The shadow pass's shader: the frame, Horizon's terrain, and the entries, with the layers
/// `solid` of `shadow_solid`.
fn shader_source(solid: &str, vertex: Option<&str>, materials: &[(u32, u32)]) -> String {
let (head, displace) = match vertex {
Some(stage) => (
stage.to_owned()
+ &super::native_material::layer_table("horizon_sprite_material", materials),
/// `solid` of `shadow_solid`. Under `[displacement]` (`grid`: the material stage's source, which
/// holds the vertex stage and `displacement`), its grid too.
fn shader_source(
solid: &str,
vertex: Option<&str>,
materials: &[(u32, u32)],
grid: Option<&str>,
) -> String {
let table = super::native_material::layer_table("horizon_sprite_material", materials);
let (head, displace) = match (grid, vertex) {
(Some(material), _) => (
format!(
"{material}{}{table}{}{}{GRID_ENTRIES}",
horizon_shader_api::stages::PBR_STUB,
super::displace::RELIEF,
super::displace::GRID,
),
if vertex.is_some() {
super::native_material::DISPLACE_PACK
} else {
super::native_material::DISPLACE_VANILLA
},
),
(None, Some(stage)) => (
format!("{stage}{table}{UNTAKEN}"),
super::native_material::DISPLACE_PACK,
),
None => (
(None, None) => (
format!(
"{}@group({GROUP}) @binding(0) var<uniform> frame: Frame;\n{}",
"{}@group({GROUP}) @binding(0) var<uniform> frame: Frame;\n{}{UNTAKEN}",
FrameInputs::WGSL.wgsl(),
horizon_shader_api::stages::SHADOW_HELPERS,
),
@@ -452,11 +520,13 @@ impl NativeShadow {
solid_materials: &[u32],
vertex: Option<&horizon_shader_api::check::CheckedStage>,
constants: &[(String, f64)],
grid: Option<ShadowGrid<'_>>,
) -> Result<Self, String> {
let text = shader_source(
&shadow_solid(shape.sprite_materials, solid_materials),
vertex.map(|s| s.source.as_str()),
shape.sprite_materials,
grid.as_ref().map(|g| g.material.source.as_str()),
);
let module = naga::front::wgsl::parse_str(&text)
.map_err(|e| format!("shadow pass: {}", e.emit_to_string(&text)))?;
@@ -465,31 +535,59 @@ impl NativeShadow {
("horizon_terrain_SPRITE_ARRAYS", shape.sprites[0]),
("horizon_terrain_SPRITE_SPLIT", shape.sprites[1]),
]);
if let Some(g) = &grid {
constants.extend([
("horizon_displace_distance", f64::from(g.distance)),
("horizon_displace_cells", f64::from(g.cells)),
("horizon_displace_steps", f64::from(u8::from(g.steps))),
]);
}
let scope = device.push_error_scope(wgpu::ErrorFilter::Validation);
let module = device.create_shader_module(wgpu::ShaderModuleDescriptor {
label: Some("Native shader pack shadow"),
source: wgpu::ShaderSource::Naga(std::borrow::Cow::Owned(module)),
});
// The frame alone, and under `[displacement]` the height maps its grid moves by.
let frame_entry = wgpu::BindGroupLayoutEntry {
binding: 0,
visibility: wgpu::ShaderStages::VERTEX,
ty: wgpu::BindingType::Buffer {
ty: wgpu::BufferBindingType::Uniform,
has_dynamic_offset: false,
min_binding_size: wgpu::BufferSize::new(size_of::<FrameInputs>() as u64),
},
count: None,
};
let normals_entry = wgpu::BindGroupLayoutEntry {
binding: 12,
visibility: wgpu::ShaderStages::VERTEX_FRAGMENT,
ty: wgpu::BindingType::Texture {
sample_type: wgpu::TextureSampleType::Float { filterable: true },
view_dimension: wgpu::TextureViewDimension::D2Array,
multisampled: false,
},
count: None,
};
let layout_entries: Vec<_> = std::iter::once(frame_entry)
.chain(grid.is_some().then_some(normals_entry))
.collect();
let frame_layout = device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
label: Some("Native shader pack shadow frame"),
entries: &[wgpu::BindGroupLayoutEntry {
binding: 0,
visibility: wgpu::ShaderStages::VERTEX,
ty: wgpu::BindingType::Buffer {
ty: wgpu::BufferBindingType::Uniform,
has_dynamic_offset: false,
min_binding_size: wgpu::BufferSize::new(size_of::<FrameInputs>() as u64),
},
count: None,
}],
entries: &layout_entries,
});
let group_entries: Vec<_> = std::iter::once(wgpu::BindGroupEntry {
binding: 0,
resource: frame.buffer.as_entire_binding(),
})
.chain(grid.as_ref().map(|g| wgpu::BindGroupEntry {
binding: 12,
resource: wgpu::BindingResource::TextureView(g.normals),
}))
.collect();
let group = device.create_bind_group(&wgpu::BindGroupDescriptor {
label: Some("Native shader pack shadow frame"),
layout: &frame_layout,
entries: &[wgpu::BindGroupEntry {
binding: 0,
resource: frame.buffer.as_entire_binding(),
}],
entries: &group_entries,
});
let layout = |flat: Option<&wgpu::BindGroupLayout>| {
let mut groups: [Option<&wgpu::BindGroupLayout>; GROUP as usize + 1] =
@@ -519,10 +617,11 @@ impl NativeShadow {
blend: None,
write_mask: wgpu::ColorWrites::ALL,
})];
let pipeline = |layout: &wgpu::PipelineLayout,
vertex: &str,
buffers: &[Option<wgpu::VertexBufferLayout<'_>>],
translucent: bool| {
let pipeline_with = |layout: &wgpu::PipelineLayout,
vertex: &str,
buffers: &[Option<wgpu::VertexBufferLayout<'_>>],
fragment: &str| {
let translucent = fragment == "horizon_shadow_fs_translucent";
let options = wgpu::PipelineCompilationOptions {
constants: &constants,
..Default::default()
@@ -556,11 +655,7 @@ impl NativeShadow {
multisample: Default::default(),
fragment: Some(wgpu::FragmentState {
module: &module,
entry_point: Some(if translucent {
"horizon_shadow_fs_translucent"
} else {
"horizon_shadow_fs"
}),
entry_point: Some(fragment),
compilation_options: options,
targets: if translucent { &color_target } else { &[] },
}),
@@ -568,6 +663,17 @@ impl NativeShadow {
cache: None,
})
};
let pipeline = |layout: &wgpu::PipelineLayout,
vertex: &str,
buffers: &[Option<wgpu::VertexBufferLayout<'_>>],
translucent: bool| {
let fragment = if translucent {
"horizon_shadow_fs_translucent"
} else {
"horizon_shadow_fs"
};
pipeline_with(layout, vertex, buffers, fragment)
};
let instanced = layout(None);
let solid = pipeline(
&instanced,
@@ -595,6 +701,15 @@ impl NativeShadow {
let flat = flat_pipeline(false);
let flat_translucent = flat_pipeline(true);
let entity = entity_pipeline(device, shape.entities, &frame_layout);
// The grid's corners come from its group 1, not from vertex buffers.
let displaced = grid.as_ref().map(|g| {
pipeline_with(
&layout(Some(g.layout)),
"horizon_shadow_vs_displaced",
&[],
"horizon_shadow_fs_displaced",
)
});
if let Some(e) = pollster::block_on(scope.pop()) {
return Err(format!("shadow pass: {e}"));
}
@@ -605,6 +720,7 @@ impl NativeShadow {
flat_translucent,
entity,
group,
displaced,
})
}
}
@@ -616,7 +732,7 @@ mod tests {
#[test]
fn the_shadow_shader_validates() {
for materials in [&[][..], &[(3, 7), (4, 8), (9, 7)][..]] {
let text = shader_source(&shadow_solid(materials, &[7]), None, materials);
let text = shader_source(&shadow_solid(materials, &[7]), None, materials, None);
let module = naga::front::wgsl::parse_str(&text).unwrap();
naga::valid::Validator::new(
naga::valid::ValidationFlags::all(),
@@ -627,6 +743,47 @@ mod tests {
}
}
#[test]
fn the_shadow_shader_with_the_displaced_grid_validates() {
use horizon_shader_api::{MANIFEST, Pack, StageKind, check};
let manifest = "schema = 1\nid = \"t\"\nname = \"T\"\nversion = \"1\"\napi = \"0.1\"\n\
[material]\nfile = \"material.wgsl\"\n[shadow]\n[displacement]\n";
let material = "fn material(input: MaterialInput) -> Surface {\n \
return Surface(input.albedo);\n}\n\
fn displacement(input: DisplacementInput) -> f32 {\n \
return (1.0 - input.height) * 0.125;\n}\n";
let files = [(MANIFEST, manifest), ("material.wgsl", material)]
.map(|(n, t)| (n.to_owned(), t.as_bytes().to_vec()))
.into();
let report = check(&Pack::from_files(files).unwrap()).unwrap();
let stage = report
.stages
.iter()
.find(|s| s.kind == StageKind::Material)
.unwrap();
let materials = [(3, 7)];
let text = shader_source(
&shadow_solid(&materials, &[7]),
None,
&materials,
Some(&stage.source),
);
let module = naga::front::wgsl::parse_str(&text)
.unwrap_or_else(|e| panic!("{}", e.emit_to_string(&text)));
naga::valid::Validator::new(
naga::valid::ValidationFlags::all(),
naga::valid::Capabilities::all(),
)
.validate(&module)
.unwrap_or_else(|e| panic!("{}", e.emit_to_string(&text)));
for entry in ["horizon_shadow_vs_displaced", "horizon_shadow_fs_displaced"] {
assert!(
module.entry_points.iter().any(|e| e.name == entry),
"{entry}"
);
}
}
#[test]
fn only_the_layers_of_solid_ids_lose_their_cutouts() {
let materials = [(3, 7), (4, 8), (9, 7)];
@@ -194,6 +194,8 @@ pub(super) struct Draw {
/// The pack's shadow program draws it into the shadow map too.
pub shadow: bool,
pub slot: u32,
/// End portal or gateway faces: drawn with `end_portal.png` bound as the atlas.
pub portal: bool,
}
/// Which entity runs a pack's shadow pass draws (2.4, 3.2).
@@ -375,38 +377,87 @@ impl PackEntities {
pack,
casts,
overlay,
false,
);
}
}
let first = spans.first().map_or(entities.len(), |s| s.start as usize);
rest.extend_from_slice(&entities[..first.min(entities.len())]);
extend_without_portals(rest, &entities[..first.min(entities.len())]);
let (mut other, mut portal_faces, mut beam_faces) = (Vec::new(), Vec::new(), Vec::new());
for (span, range) in runs(entities.len(), spans) {
let run = &entities[range];
let program = program_of(&span).filter(|&p| {
plain(run) || (p == DESTROY && run.iter().all(|v| matches!(v.layer, 11 | 12)))
});
let pack = program.is_some_and(|p| drawn[p]) && !span.hidden;
let casts = program.is_some_and(|p| shadow.cast(&span, p));
if !pack && !span.hidden {
rest.extend_from_slice(run);
}
let Some(program) = program.filter(|_| (pack || casts) && !run.is_empty()) else {
continue;
let whole = &entities[range];
// A block entity's run can hold End portal faces and beams beside plain parts (an End
// gateway: its cube and its beam): each goes to its own program.
// Beacon beams come in a run of their own, at stage NONE (game.rs: no stage of 5.4
// is theirs), for gbuffers_beaconbeam.
let split = (program_of(&span) == Some(BLOCK) || span.stage == render_stage("NONE"))
&& whole
.chunks(4)
.any(|q| matches!(q[0].layer & 0xffff, 6 | 9 | 10));
let parts: [(&[Vertex], Part); 3] = if split {
other.clear();
portal_faces.clear();
beam_faces.clear();
for quad in whole.chunks(4) {
match quad[0].layer & 0xffff {
9 | 10 => portal_faces.extend_from_slice(quad),
6 => beam_faces.extend_from_slice(quad),
_ => other.extend_from_slice(quad),
}
}
[
(&other, Part::Plain),
(&portal_faces, Part::Portal),
(&beam_faces, Part::Beam),
]
} else {
[(whole, Part::Plain), (&[], Part::Plain), (&[], Part::Plain)]
};
let start = self.scratch.len() as u32;
self.scratch.extend_from_slice(run);
if program == DESTROY {
project_cracks(&mut self.scratch[start as usize..], crack.0, crack.1);
for (run, part) in parts {
if run.is_empty() {
continue;
}
let program = match part {
Part::Portal => Some(BLOCK),
Part::Beam => Some(BEAM),
Part::Plain => program_of(&span).filter(|&p| {
plain(run)
|| (p == DESTROY && run.iter().all(|v| matches!(v.layer, 11 | 12)))
}),
};
let pack = program.is_some_and(|p| drawn[p]) && !span.hidden;
let casts = part == Part::Plain && program.is_some_and(|p| shadow.cast(&span, p));
if !pack && !span.hidden {
extend_without_portals(rest, run);
}
let Some(program) = program.filter(|_| pack || casts) else {
continue;
};
let start = self.scratch.len() as u32;
match part {
Part::Beam => beam_segments(run, &mut self.scratch),
_ => self.scratch.extend_from_slice(run),
}
if program == DESTROY {
project_cracks(&mut self.scratch[start as usize..], crack.0, crack.1);
}
if part == Part::Portal {
as_portal_texture(&mut self.scratch[start as usize..]);
}
let vertices = self.scratch.len() as u32 - start;
let overlay = self.scratch[start as usize].layer & 0xffff;
let portal = part == Part::Portal;
self.push_draw(
span,
posed + start,
vertices,
program,
pack,
casts,
overlay,
portal,
);
}
self.push_draw(
span,
posed + start,
run.len() as u32,
program,
pack,
casts,
run[0].layer & 0xffff,
);
}
if self.draws.is_empty() && posed == 0 {
return;
@@ -453,6 +504,7 @@ impl PackEntities {
pack: bool,
casts: bool,
overlay: u32,
portal: bool,
) {
let (entity_id, block_id) = match program {
BLOCK => (0, span.id),
@@ -476,6 +528,7 @@ impl PackEntities {
pack,
shadow: casts,
slot: self.draws.len() as u32,
portal,
});
}
}
@@ -504,13 +557,104 @@ fn plain(run: &[Vertex]) -> bool {
.all(|v| !matches!(v.layer & 0xffff, 2 | 4 | 6 | 9 | 10 | 11 | 12 | 34))
}
/// What part of a block entity's run goes to which program (`prepare`).
#[derive(Clone, Copy, PartialEq, Eq)]
enum Part {
Plain,
Portal,
Beam,
}
/// Beam faces (`block_entity_render::beam`: layer 6, v counting the sprite's repeats up the
/// beam, the sprite's v range in the light bytes) for a pack: each face cut where its texture
/// repeats, so every piece holds one copy of the sprite in plain atlas coordinates (at most 64
/// pieces a face; a taller beam stretches its copies), white light and its colour kept.
fn beam_segments(run: &[Vertex], out: &mut Vec<Vertex>) {
for quad in run.as_chunks::<4>().0 {
let wrap = quad[0].light;
let (v0, size) = (
(wrap & 65535) as f32 / 65535.0,
(wrap >> 16) as f32 / 65535.0,
);
// Corners 0 and 3 at the beam's end (v1), 1 and 2 at its start (v2); 0 and 1 on one
// side, 2 and 3 on the other.
let (v1, v2) = (quad[0].uv[1], quad[1].uv[1]);
if (v1 - v2).abs() < 1e-6 {
continue;
}
let (lo, hi) = (v1.min(v2), v1.max(v2));
let first = lo.floor();
let repeats = (hi.ceil() - first).max(1.0);
let step = (repeats / 64.0).ceil().max(1.0);
let pieces = (repeats / step).ceil() as u32;
let at = |side: usize, v: f32| {
let (a, b) = if side == 0 {
(quad[1], quad[0])
} else {
(quad[2], quad[3])
};
let t = (v - v2) / (v1 - v2);
glam::Vec3::from(a.pos)
.lerp(glam::Vec3::from(b.pos), t)
.to_array()
};
for k in 0..pieces {
let base = first + k as f32 * step;
let (a, b) = (base.max(lo), (base + step).min(hi));
if b <= a {
continue;
}
// The end-side corners take the piece's bound nearer v1.
let (end_v, start_v) = if v1 > v2 { (b, a) } else { (a, b) };
for (i, corner) in quad.iter().enumerate() {
let side = usize::from(i >= 2);
let v = if i == 0 || i == 3 { end_v } else { start_v };
let mut out_v = *corner;
out_v.pos = at(side, v);
out_v.uv = [corner.uv[0], v0 + (v - base) / step * size];
out_v.layer = 0;
out_v.light = 0x0000_f0f0;
out.push(out_v);
}
}
}
}
/// `run` added to Horizon's own draw without End portal faces: under a shader pack Horizon's
/// entity shader would put its screen-projected starfield into the pack's buffers as if they
/// were its own frame (misplaced where the pack renders at another size), so a portal the pack
/// does not draw (its programs not there, or not yet) is better left out.
fn extend_without_portals(rest: &mut Vec<Vertex>, run: &[Vertex]) {
for quad in run.chunks(4) {
if !quad.iter().all(|v| matches!(v.layer & 0xffff, 6 | 9 | 10)) {
rest.extend_from_slice(quad);
}
}
}
/// End portal faces for a pack's `gbuffers_block` (block entities): each face textured with the
/// whole of `end_portal.png`, which the draw binds as the atlas (a texture of its own, so a
/// pack's own portal effect can wrap it), white, at full light; the pack tells the portal by its
/// `blockEntityId`.
fn as_portal_texture(run: &mut [Vertex]) {
const CORNERS: [[f32; 2]; 4] = [[0.0, 0.0], [0.0, 1.0], [1.0, 1.0], [1.0, 0.0]];
for (i, v) in run.iter_mut().enumerate() {
v.uv = CORNERS[i % 4];
v.layer = 0;
v.color = 0xFFFF_FFFF;
v.light = 0x0000_f0f0;
}
}
/// The programs of entity runs, in the order they draw.
pub const ENTITY: usize = 0;
pub const BLOCK: usize = 1;
pub const TRANSLUCENT: usize = 2;
pub const PARTICLE: usize = 3;
pub const DESTROY: usize = 4;
pub const PROGRAMS: usize = 5;
/// Beacon and End gateway beams (`gbuffers_beaconbeam`).
pub const BEAM: usize = 5;
pub const PROGRAMS: usize = 6;
/// Which program draws `span`'s run, given which of them (or their fallbacks) the pack has;
/// `None`: Horizon draws it.
@@ -587,11 +731,11 @@ mod tests {
assert_eq!(drawn_by_pack(&spans[0], all), Some(ENTITY));
assert_eq!(drawn_by_pack(&spans[1], all), Some(PARTICLE));
assert_eq!(
drawn_by_pack(&spans[1], [true, true, true, false, true]),
drawn_by_pack(&spans[1], [true, true, true, false, true, true]),
None
);
assert_eq!(
drawn_by_pack(&spans[2], [true, false, true, true, true]),
drawn_by_pack(&spans[2], [true, false, true, true, true, true]),
None
);
assert_eq!(drawn_by_pack(&spans[2], all), Some(BLOCK));
@@ -654,6 +798,103 @@ fn project_cracks(vertices: &mut [Vertex], sprite: [f32; 4], atlas: [u32; 2]) {
}
}
#[cfg(test)]
mod portal_beam_tests {
use super::*;
fn quad(layer: u32, light: u32, corners: [([f32; 3], [f32; 2]); 4]) -> [Vertex; 4] {
corners.map(|(pos, uv)| Vertex {
pos,
uv,
layer,
color: 0xFF20_40FF,
light,
..bytemuck::Zeroable::zeroed()
})
}
#[test]
fn a_beam_face_becomes_one_sprite_copy_per_repeat() {
// `block_entity_render::beam`'s corner order: 0 and 3 at the end (v1), 1 and 2 at the
// start (v2); the sprite's v range (0.25, height 0.5) in the light bytes.
let wrap = (0.25f32 * 65535.0).round() as u32 | ((0.5f32 * 65535.0).round() as u32) << 16;
let face = quad(
6,
wrap,
[
([0.0, 3.0, 0.0], [0.9, 3.0]),
([0.0, 0.0, 0.0], [0.9, 0.0]),
([1.0, 0.0, 0.0], [0.1, 0.0]),
([1.0, 3.0, 0.0], [0.1, 3.0]),
],
);
let mut out = Vec::new();
beam_segments(&face, &mut out);
assert_eq!(out.len(), 12, "three repeats, three pieces");
for (k, piece) in out.chunks(4).enumerate() {
let (bottom, top) = (k as f32, k as f32 + 1.0);
assert_eq!([piece[0].pos[1], piece[1].pos[1]], [top, bottom]);
assert_eq!([piece[2].pos[1], piece[3].pos[1]], [bottom, top]);
for v in piece {
assert!((0.25 - 1e-4..=0.75 + 1e-4).contains(&v.uv[1]), "{:?}", v.uv);
assert_eq!(v.layer, 0);
assert_eq!(v.light, 0x0000_f0f0);
assert_eq!(v.color, 0xFF20_40FF);
}
assert!((piece[0].uv[1] - 0.75).abs() < 1e-4 && (piece[1].uv[1] - 0.25).abs() < 1e-4);
assert_eq!([piece[0].uv[0], piece[2].uv[0]], [0.9, 0.1]);
}
}
#[test]
fn a_very_tall_beam_is_cut_into_at_most_64_pieces() {
let face = quad(
6,
0xFFFF_0000,
[
([0.0, 2000.0, 0.0], [1.0, 2000.0]),
([0.0, 0.0, 0.0], [1.0, 0.0]),
([1.0, 0.0, 0.0], [0.0, 0.0]),
([1.0, 2000.0, 0.0], [0.0, 2000.0]),
],
);
let mut out = Vec::new();
beam_segments(&face, &mut out);
assert!(out.len() / 4 <= 64, "{} pieces", out.len() / 4);
let top = out.iter().map(|v| v.pos[1]).fold(f32::MIN, f32::max);
let bottom = out.iter().map(|v| v.pos[1]).fold(f32::MAX, f32::min);
assert_eq!(
(bottom, top),
(0.0, 2000.0),
"the pieces still span the whole beam"
);
}
#[test]
fn portal_faces_take_the_whole_portal_texture_at_full_light() {
let mut face = quad(9, 0, [([0.0; 3], [0.0; 2]); 4]).to_vec();
as_portal_texture(&mut face);
let uvs: Vec<[f32; 2]> = face.iter().map(|v| v.uv).collect();
assert_eq!(uvs, [[0.0, 0.0], [0.0, 1.0], [1.0, 1.0], [1.0, 0.0]]);
assert!(
face.iter()
.all(|v| v.layer == 0 && v.color == 0xFFFF_FFFF && v.light == 0x0000_f0f0)
);
}
#[test]
fn horizon_keeps_no_portal_or_beam_face_under_a_pack() {
let mut run = Vec::new();
for layer in [0, 6, 9, 10, 2] {
run.extend(quad(layer, 0, [([0.0; 3], [0.0; 2]); 4]));
}
let mut rest = Vec::new();
extend_without_portals(&mut rest, &run);
let kept: Vec<u32> = rest.chunks(4).map(|q| q[0].layer).collect();
assert_eq!(kept, [0, 2]);
}
}
#[cfg(test)]
mod crack_projection_tests {
use super::*;
@@ -35,7 +35,9 @@ pub(super) fn images(defs: Vec<CustomImage>) -> Vec<PackImage> {
defs.into_iter()
.map(|def| PackImage {
format: format(def.format),
dimension: if def.is_3d() {
dimension: if def.is_1d() {
wgpu::TextureViewDimension::D1
} else if def.is_3d() {
wgpu::TextureViewDimension::D3
} else {
wgpu::TextureViewDimension::D2
@@ -51,6 +53,15 @@ pub(super) fn images(defs: Vec<CustomImage>) -> Vec<PackImage> {
.collect()
}
/// The texture dimension a view of `view` needs.
fn texture_dimension(view: wgpu::TextureViewDimension) -> wgpu::TextureDimension {
match view {
wgpu::TextureViewDimension::D1 => wgpu::TextureDimension::D1,
wgpu::TextureViewDimension::D3 => wgpu::TextureDimension::D3,
_ => wgpu::TextureDimension::D2,
}
}
/// The wgpu format of an image's internal format: a storage format of the same channels.
pub(super) fn format(f: Format) -> wgpu::TextureFormat {
use wgpu::TextureFormat as T;
@@ -85,7 +96,9 @@ pub(super) fn makeable(device: &wgpu::Device, def: &CustomImage) -> Result<(), S
));
}
let limits = device.limits();
let largest = if def.is_3d() {
let largest = if def.is_1d() {
limits.max_texture_dimension_1d
} else if def.is_3d() {
limits.max_texture_dimension_3d
} else {
limits.max_texture_dimension_2d
@@ -128,11 +141,7 @@ pub(super) fn resize_images(
},
mip_level_count: 1,
sample_count: 1,
dimension: if image.dimension == wgpu::TextureViewDimension::D3 {
wgpu::TextureDimension::D3
} else {
wgpu::TextureDimension::D2
},
dimension: texture_dimension(image.dimension),
format: image.format,
usage: wgpu::TextureUsages::TEXTURE_BINDING | usage,
view_formats: &[],
@@ -321,11 +330,7 @@ pub(super) fn stand_ins(
},
mip_level_count: 1,
sample_count: 1,
dimension: if dimension == wgpu::TextureViewDimension::D3 {
wgpu::TextureDimension::D3
} else {
wgpu::TextureDimension::D2
},
dimension: texture_dimension(dimension),
format,
usage: wgpu::TextureUsages::STORAGE_BINDING
| wgpu::TextureUsages::COPY_DST
+242 -18
View File
@@ -17,7 +17,7 @@
use std::collections::HashMap;
use glam::{DMat4, DVec3};
use horizon_shaders::{Format, Group, Kind, Post, Val};
use horizon_shaders::{Format, Group, Kind, Post, SHADOW_COLORS, Val};
use super::pack_draw::DrawUniforms;
use super::pack_entities::{PROGRAMS, PackEntities};
@@ -31,6 +31,9 @@ const BUFFERS: usize = horizon_shaders::BUFFERS;
#[cfg(test)]
mod world_target_tests;
#[cfg(test)]
mod higher_shadowcolor_tests;
/// The texture behind a pack sampler name.
#[derive(Clone, Copy, PartialEq)]
enum Source {
@@ -368,6 +371,8 @@ struct Pass {
/// Bind groups by the sides read (bits 0–15), the buffers whose mip chain is current (bits
/// 16–31) and the shadowcolor sides read (bits 32–33).
groups: HashMap<u64, wgpu::BindGroup>,
/// The same for End portal draws, with `end_portal.png` bound as the atlas.
portal_groups: HashMap<u64, wgpu::BindGroup>,
/// (binding, target) of each image: for a buffer, the side its sampler reads.
images: Vec<(u32, Image)>,
/// Binds the pack's storage buffers in set 4.
@@ -542,6 +547,10 @@ pub struct PackPost {
shadow_targets: Option<super::pack_shadow::ShadowTargets>,
/// What draws terrain from the light (`shadow`), and translucent terrain (`shadow_water`).
shadow_terrain: Option<Pass>,
/// `end_portal.png`'s atlas rect this frame, and a texture of its own copied from it that
/// End portal draws bind as their atlas.
portal_rect: [f32; 4],
portal_texture: Option<([f32; 4], wgpu::TextureView)>,
shadow_water: Option<Pass>,
shadow_comp: Vec<Pass>,
/// Buffers with mipmaps (filterable ones a program asks them for).
@@ -700,11 +709,7 @@ fn fits(ty: &str, sample_type: wgpu::TextureSampleType) -> bool {
}
fn source(name: &str, shadow_space: bool, shadow_pass: bool, watershadow: bool) -> Source {
let shadow_color = match name {
"shadowcolor" | "shadowcolor0" => Some(0),
"shadowcolor1" => Some(1),
_ => None,
};
let shadow_color = horizon_shaders::shadow_color(name);
let shadow_depth = match name {
"shadowtex0" | "watershadow" | "shadowtex0HW" => Some(0),
"shadowtex1" | "shadowtex1HW" => Some(1),
@@ -1097,7 +1102,7 @@ fn bindings(
buffers: &[u32],
geometry: Option<&Geometry<'_>>,
formats: &[wgpu::TextureFormat; BUFFERS],
shadow: Option<&[wgpu::TextureFormat; 2]>,
shadow: Option<&[wgpu::TextureFormat; SHADOW_COLORS]>,
notes: &mut Vec<String>,
pack: &Resources<'_>,
) -> Option<(
@@ -1289,7 +1294,9 @@ fn bindings(
notes.push(format!("{name}: `{}` has format {}", i.name, i.format));
return None;
};
let dimension = if i.ty.ends_with("3D") {
let dimension = if i.ty.ends_with("1D") {
wgpu::TextureViewDimension::D1
} else if i.ty.ends_with("3D") {
wgpu::TextureViewDimension::D3
} else {
wgpu::TextureViewDimension::D2
@@ -1417,7 +1424,7 @@ fn build_pass(
device: &wgpu::Device,
p: horizon_shaders::PostProgram,
formats: &[wgpu::TextureFormat; BUFFERS],
shadow: Option<&[wgpu::TextureFormat; 2]>,
shadow: Option<&[wgpu::TextureFormat; SHADOW_COLORS]>,
screen: wgpu::TextureFormat,
notes: &mut Vec<String>,
geometry: Option<&Geometry<'_>>,
@@ -1428,7 +1435,7 @@ fn build_pass(
let features = device.features();
// The frame's uniforms, then the pack's custom ones.
let index = |name: &str| {
pack_uniforms::index(name).or_else(|| {
pack_uniforms::index_in(name, geometry.is_some()).or_else(|| {
let k = custom.iter().position(|c| c == name)?;
Some(pack_uniforms::NAMES.len() + k)
})
@@ -1647,6 +1654,7 @@ fn build_pass(
atlas: geometry.and_then(|g| g.atlas.clone()),
ids: geometry.is_some_and(|g| g.ids.is_some()),
groups: HashMap::new(),
portal_groups: HashMap::new(),
copies: image_buffers(&images) & reads,
reads: reads | image_buffers(&images),
buffers: !interface.buffers.is_empty(),
@@ -1680,7 +1688,7 @@ fn build_compute(
group: Group,
c: horizon_shaders::ComputeProgram,
formats: &[wgpu::TextureFormat; BUFFERS],
shadow: Option<&[wgpu::TextureFormat; 2]>,
shadow: Option<&[wgpu::TextureFormat; SHADOW_COLORS]>,
notes: &mut Vec<String>,
custom: &[String],
pack: &Resources<'_>,
@@ -1781,6 +1789,7 @@ fn build_compute(
atlas: None,
ids: false,
groups: HashMap::new(),
portal_groups: HashMap::new(),
buffers: !interface.buffers.is_empty(),
images,
compute: Vec::new(),
@@ -1836,6 +1845,8 @@ impl PackPost {
}
let textures = pack_textures::upload(device, queue, post.textures, &mut notes);
let shadow_config = post.config.shadow.clone();
// shadowcolor2 to 7 only for a pack that names `HIGHER_SHADOWCOLOR`.
let shadow_colors = (1u16 << post.shadow_colors) - 1;
let mut custom = post.custom;
let custom_names: Vec<String> = custom.uniforms().map(|u| u.0.to_owned()).collect();
// A first run finds the names neither the frame nor the pack defines.
@@ -1851,13 +1862,14 @@ impl PackPost {
let mut used = 1u16;
let draws = DrawUniforms::new(device);
// The shadow buffers' formats when the shadow pass runs; their programs see them as
// buffers 0 and 1.
let shadow_formats: Option<[wgpu::TextureFormat; 2]> = post.shadow_pass.then(|| {
std::array::from_fn(|n| texture_format(shadow_config.colors[n].format, features))
});
// buffers 0 to 7.
let shadow_formats: Option<[wgpu::TextureFormat; SHADOW_COLORS]> =
post.shadow_pass.then(|| {
std::array::from_fn(|n| texture_format(shadow_config.colors[n].format, features))
});
let shadow_space: [wgpu::TextureFormat; BUFFERS] = std::array::from_fn(|i| {
shadow_formats
.filter(|_| i < 2)
.filter(|_| i < SHADOW_COLORS)
.map_or(formats[i], |f| f[i])
});
let (mut storage, mut copied, mut image_copied, mut snapshotted) = (0u16, 0u16, 0u64, 0u64);
@@ -2073,6 +2085,7 @@ impl PackPost {
post.entities_translucent,
post.particles,
post.damaged_block,
post.beacon_beam,
];
let late = [
false,
@@ -2080,6 +2093,7 @@ impl PackPost {
post.translucent_late,
post.particles_late,
false,
true,
];
let shadow_only = (post.shadow_only_player, post.shadow_only_lit_blocks);
let shadow_programs = [post.shadow_entities, post.shadow_block];
@@ -2295,7 +2309,7 @@ impl PackPost {
0
};
m | own | p.shadow_reads
});
}) & shadow_colors;
let depth1 = every_pass()
.flat_map(|p| &p.samplers)
.any(|s| matches!(s.source, Source::ShadowDepth(1, _)));
@@ -2484,6 +2498,8 @@ impl PackPost {
depth2,
shadow_targets,
shadow_terrain,
portal_rect: [0.0; 4],
portal_texture: None,
shadow_water,
shadow_comp,
mipped,
@@ -2903,7 +2919,7 @@ impl PackPost {
// one clearing them.
let (depth_ops, shadow_ops) = match &mut self.shadow_targets {
Some(s) if pass.group.shadow() => s.clear_ops(pass.writes.iter().map(|w| w.1)),
_ => (super::pack_shadow::load(), [load; 2]),
_ => (super::pack_shadow::load(), [load; SHADOW_COLORS]),
};
let shadow = self.shadow_targets.as_ref().filter(|_| pass.group.shadow());
let mut attachments: Vec<Option<wgpu::RenderPassColorAttachment>> = Vec::new();
@@ -3088,6 +3104,42 @@ impl PackPost {
continue;
}
let group = self.bind(device, queue, encoder, pass, size);
// End portal faces bind `end_portal.png` as the atlas, a texture of its own, so packs
// that wrap it with their own coordinates sample the portal sprite only.
let portal_group = if geometry
.draws
.iter()
.any(|d| d.pack && d.program == program && d.portal)
&& let Some(atlas) = pass.atlas.clone().or_else(|| self.atlas.clone())
&& self.portal_rect[2] > 0.0
{
if self
.portal_texture
.as_ref()
.is_none_or(|(rect, _)| *rect != self.portal_rect)
{
pass.portal_groups.clear();
let view = super::pack_weather::copy_sprite(
device,
encoder,
atlas.texture(),
self.portal_rect,
);
self.portal_texture = Some((self.portal_rect, view));
}
let view = self.portal_texture.as_ref().map(|p| p.1.clone());
// `bind` caches groups by a key without the atlas: the portal groups are kept
// in a cache of their own, swapped in with the texture.
let saved = std::mem::replace(&mut pass.atlas, view);
let groups =
std::mem::replace(&mut pass.groups, std::mem::take(&mut pass.portal_groups));
let g = self.bind(device, queue, encoder, pass, size);
pass.portal_groups = std::mem::replace(&mut pass.groups, groups);
pass.atlas = saved;
Some(g)
} else {
None
};
{
let mut rp = self.begin(encoder, pass);
rp.set_pipeline(pass.render());
@@ -3100,7 +3152,14 @@ impl PackPost {
rp.set_bind_group(1, &geometry.table_group, &[]);
rp.set_vertex_buffer(0, geometry.vertices());
rp.set_index_buffer(geometry.indices.slice(..), wgpu::IndexFormat::Uint32);
let mut on_portal = false;
for d in draws {
if let Some(portal) = &portal_group
&& d.portal != on_portal
{
rp.set_bind_group(0, if d.portal { portal } else { &group }, &[]);
on_portal = d.portal;
}
if pass.draw {
rp.set_bind_group(2, &geometry.group, &[geometry.offset(d.slot)]);
}
@@ -3174,9 +3233,11 @@ impl PackPost {
entities: &[super::Vertex],
spans: &[super::pack_draw::EntitySpan],
crumbling: [f32; 4],
portal: [f32; 4],
rest: &mut Vec<super::Vertex>,
skin: Option<&super::entity_skin::SkinFrame>,
) {
self.portal_rect = portal;
let shadow = self.shadow_casters();
let Some(e) = &mut self.entities else {
rest.clear();
@@ -4711,6 +4772,169 @@ mod tests {
);
}
/// `blend.<program>` of a composite program blends its output onto what the buffer's side
/// holds (Iris 1.11.7, probed: 0.25 over 0.75 with SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE ZERO and
/// a source alpha of 0.25 reads 0.625).
#[test]
fn a_composite_program_blends_onto_its_buffer() {
let instance = crate::gfx::test_gpu::instance();
let Ok(adapter) = pollster::block_on(instance.request_adapter(&Default::default())) else {
return;
};
// A pass's pipeline layout has six bind group slots.
let desc = wgpu::DeviceDescriptor {
required_limits: adapter.limits(),
..Default::default()
};
let Ok((device, queue)) = pollster::block_on(adapter.request_device(&desc)) else {
return;
};
let dir = std::env::temp_dir().join(format!("hz-composite-blend-{}", std::process::id()));
let shaders = dir.join("shaders");
std::fs::create_dir_all(&shaders).unwrap();
let file = |name: &str, text: &str| std::fs::write(shaders.join(name), text).unwrap();
file(
"composite.vsh",
"#version 120\nvoid main() { gl_Position = ftransform(); }\n",
);
file(
"composite.fsh",
"#version 120\n/* DRAWBUFFERS:3 */\n\
void main() { gl_FragData[0] = vec4(0.25, 0.25, 1.0, 0.25); }\n",
);
let pack = horizon_shaders::Pack::open(&dir).unwrap();
let properties = horizon_shaders::Properties::parse(
"blend.composite = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE ZERO\n",
&horizon_shaders::Macros::default(),
);
let mut post = horizon_shaders::load_post(
&pack,
"",
&properties,
&horizon_shaders::Macros::standard(),
&Default::default(),
);
std::fs::remove_dir_all(&dir).unwrap();
let program = post.programs.remove(0);
let buffers = pack_images::Buffers::new(
&device,
Default::default(),
Default::default(),
wgpu::ShaderStages::FRAGMENT,
);
let stand_ins = std::cell::RefCell::new(Vec::new());
let pack = Resources {
textures: &[],
images: &[],
left_out: &[],
buffers: &buffers,
indices: None,
gpu: Gpu::of(&adapter, device.features()),
storable: 0,
rgb: 0,
released: std::cell::Cell::new(("", 0)),
stand_ins: &stand_ins,
};
let draws = DrawUniforms::new(&device);
let mut notes = Vec::new();
let pass = build_pass(
&device,
program,
&[T::Rgba8Unorm; BUFFERS],
None,
T::Rgba8Unorm,
&mut notes,
None,
&[],
&draws.layout,
&pack,
)
.unwrap_or_else(|| panic!("the pass builds: {notes:?}"));
// colortex3 holds (0.75, 0.5, 0.25, 0.5) before the pass.
let texture = device.create_texture(&wgpu::TextureDescriptor {
label: None,
size: wgpu::Extent3d {
width: 64,
height: 1,
depth_or_array_layers: 1,
},
mip_level_count: 1,
sample_count: 1,
dimension: wgpu::TextureDimension::D2,
format: T::Rgba8Unorm,
usage: wgpu::TextureUsages::RENDER_ATTACHMENT | wgpu::TextureUsages::COPY_SRC,
view_formats: &[],
});
let view = texture.create_view(&Default::default());
let head = [64.0f32, 1.0, 1.0 / 64.0, 1.0];
queue.write_buffer(&pass.ubo, 0, bytemuck::cast_slice(&head));
let group = device.create_bind_group(&wgpu::BindGroupDescriptor {
label: None,
layout: &pass.layout,
entries: &[wgpu::BindGroupEntry {
binding: 0,
resource: pass.ubo.as_entire_binding(),
}],
});
let mut encoder = device.create_command_encoder(&Default::default());
let before = wgpu::Color {
r: 0.75,
g: 0.5,
b: 0.25,
a: 0.5,
};
encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
color_attachments: &[attach(
&view,
wgpu::Operations {
load: wgpu::LoadOp::Clear(before),
store: wgpu::StoreOp::Store,
},
)],
..Default::default()
});
{
// Loaded, as `PackPost::render` attaches a buffer a composite pass writes.
let load = wgpu::Operations {
load: wgpu::LoadOp::Load,
store: wgpu::StoreOp::Store,
};
let mut rp = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
color_attachments: &[attach(&view, load)],
..Default::default()
});
rp.set_pipeline(pass.render());
rp.set_bind_group(0, &group, &[]);
rp.draw(0..6, 0..1);
}
let read = device.create_buffer(&wgpu::BufferDescriptor {
label: None,
size: 256,
usage: wgpu::BufferUsages::COPY_DST | wgpu::BufferUsages::MAP_READ,
mapped_at_creation: false,
});
encoder.copy_texture_to_buffer(
texture.as_image_copy(),
wgpu::TexelCopyBufferInfo {
buffer: &read,
layout: wgpu::TexelCopyBufferLayout::default(),
},
texture.size(),
);
queue.submit([encoder.finish()]);
read.slice(..).map_async(wgpu::MapMode::Read, |_| {});
device.poll(wgpu::PollType::wait_indefinitely()).unwrap();
let texel: Vec<u8> = read.slice(..).get_mapped_range().unwrap()[..4].to_vec();
// rgb = 0.25 × src + 0.75 × dst, alpha = the source's.
let expected = [0.625, 0.4375, 0.4375, 0.25].map(|v: f32| v * 255.0);
for (got, want) in texel.iter().zip(expected) {
assert!(
(f32::from(*got) - want).abs() <= 1.0,
"{texel:?} vs {expected:?}"
);
}
}
#[test]
fn pack_formats_map_to_renderable_ones() {
let f = |name| texture_format(Format::parse(name).unwrap(), wgpu::Features::empty());
@@ -0,0 +1,82 @@
//! `HIGHER_SHADOWCOLOR`: shadowcolor2 to 7 are written by shadow programs' directives, read by
//! them and by the other programs, and cleared to their own colours, as in Iris 1.11.7 (probe
//! packs p7951a to c; the PR has the readings). The programs here are original and cut down.
use super::destination_tests::Fixture;
use super::*;
use std::io::{Cursor, Write};
const VERTEX: &str = "#version 120\nvarying vec2 uv;\nvoid main() { uv=gl_MultiTexCoord0.xy; gl_Position=ftransform(); }\n";
fn pack() -> Post {
let mut zip = zip::ZipWriter::new(Cursor::new(Vec::new()));
let mut add = |name: &str, source: &str| {
zip.start_file(
format!("shaders/{name}"),
zip::write::SimpleFileOptions::default(),
)
.unwrap();
zip.write_all(source.as_bytes()).unwrap();
};
add("shadowcomp.vsh", VERTEX);
add(
"shadowcomp.fsh",
"#version 120\n/* RENDERTARGETS: 2,7 */\n\
void main() { gl_FragData[0]=vec4(0.25,0,0,1); gl_FragData[1]=vec4(0,0.5,0,1); }\n",
);
// A shadow program reads a higher buffer it didn't write.
add("shadowcomp1.vsh", VERTEX);
add(
"shadowcomp1.fsh",
"#version 120\n/* RENDERTARGETS: 3 */\nuniform sampler2D shadowcolor7;\nvarying vec2 uv;\n\
void main() { gl_FragData[0]=texture2D(shadowcolor7,uv); }\n",
);
add("final.vsh", VERTEX);
// Pixel column x shows shadowcolor 2, 3, 5 and 6 in turn.
add(
"final.fsh",
"#version 330 compatibility\nconst int shadowMapResolution=16;\n\
const vec4 shadowcolor5ClearColor=vec4(0,0,0.75,1);\n\
uniform sampler2D shadowcolor2;\nuniform sampler2D shadowcolor3;\n\
uniform sampler2D shadowcolor5;\nuniform sampler2D shadowcolor6;\nin vec2 uv;\n\
void main() {\n vec4 c[4] = vec4[4](texture(shadowcolor2,uv), texture(shadowcolor3,uv),\n\
texture(shadowcolor5,uv), texture(shadowcolor6,uv));\n\
gl_FragColor = c[int(gl_FragCoord.x) % 4];\n}\n",
);
add(
"shaders.properties",
"shadow.enabled=true\niris.features.required = HIGHER_SHADOWCOLOR\n",
);
let pack = horizon_shaders::Pack::from_zip_bytes(
"original-higher-shadowcolor",
zip.finish().unwrap().into_inner(),
)
.unwrap();
let mut macros = horizon_shaders::Macros::standard();
let (properties, _) = horizon_shaders::read_properties(&pack, &mut macros);
horizon_shaders::load_post(&pack, "", &properties, &macros, &Default::default())
}
#[test]
fn higher_shadowcolor_buffers_are_written_read_and_cleared() {
let Some(gpu) = Fixture::new() else { return };
let mut post = gpu.build(pack());
// Two frames: the second starts from the first one's buffers.
for frame in 0..2 {
let pixels = gpu.render(&mut post, [8, 8]);
// shadowcolor2 written red, 3 a copy of 7 (green), 5 its clear colour, 6 white.
let expected = [
[64, 0, 0, 255],
[0, 128, 0, 255],
[0, 0, 191, 255],
[255; 4],
];
for (x, want) in expected.iter().enumerate() {
let got = pixels[x];
assert!(
got.iter().zip(want).all(|(g, w)| g.abs_diff(*w) <= 1),
"frame {frame}, column {x}: {got:?}, expected {want:?}; row {:?}",
&pixels[..4]
);
}
}
}
@@ -1,8 +1,10 @@
//! A shader pack's shadow buffers (spec 6.3): the shadow map's depth (`shadowtex0`, and
//! `shadowtex1` without translucent geometry), and the colour buffers `shadowcolor0/1`, each
//! `shadowtex1` without translucent geometry), and the colour buffers `shadowcolor0` to `7`, each
//! with two sides that `shadowcomp` programs flip as composite programs flip colortex (6.1.6).
//! Square, `shadowMapResolution` pixels.
use horizon_shaders::SHADOW_COLORS;
type Ops<T> = wgpu::Operations<T>;
type Color = wgpu::Color;
@@ -34,9 +36,9 @@ pub(super) struct ShadowTargets {
/// `shadowtex1`: a copy of `shadowtex0` taken before translucent terrain, when read.
pub depth1: Option<(wgpu::Texture, wgpu::TextureView)>,
/// Both sides of each shadowcolor buffer used.
pub color: [Option<[wgpu::TextureView; 2]>; 2],
pub color: [Option<[wgpu::TextureView; 2]>; SHADOW_COLORS],
/// The clear colour of each buffer cleared every frame.
pub clears: [Option<[f32; 4]>; 2],
pub clears: [Option<[f32; 4]>; SHADOW_COLORS],
/// Bit n set: B is shadowcolor n's "main".
pub main: u16,
/// Nothing cleared yet this frame: the first pass into the shadow buffers clears them as it
@@ -79,7 +81,7 @@ impl ShadowTargets {
pub fn new(
device: &wgpu::Device,
shadow: &horizon_shaders::Shadow,
formats: [wgpu::TextureFormat; 2],
formats: [wgpu::TextureFormat; SHADOW_COLORS],
colors: u16,
depth1: bool,
) -> Self {
@@ -143,12 +145,12 @@ impl ShadowTargets {
pub fn clear_ops(
&mut self,
writes: impl Iterator<Item = usize>,
) -> (Ops<f32>, [Ops<Color>; 2]) {
) -> (Ops<f32>, [Ops<Color>; SHADOW_COLORS]) {
if !std::mem::take(&mut self.fresh) {
return (load(), [load(); 2]);
return (load(), [load(); SHADOW_COLORS]);
}
let mut colors = [load(); 2];
for n in writes.filter(|&n| n < 2) {
let mut colors = [load(); SHADOW_COLORS];
for n in writes.filter(|&n| n < SHADOW_COLORS) {
if let Some(c) = self.clears[n] {
colors[n] = clear(c);
self.cleared |= 1 << n;
@@ -162,11 +164,12 @@ impl ShadowTargets {
}
/// Clears what no pass has cleared this frame: all of it when no shadow program drew, the
/// cleared shadowcolor buffers the first one did not write.
/// cleared shadowcolor buffers the first one did not write. One buffer a pass: eight wide
/// formats together would pass the device's bytes-per-sample limit.
pub fn clear_rest(&mut self, encoder: &mut wgpu::CommandEncoder) {
let depth = std::mem::take(&mut self.fresh);
let cleared = std::mem::replace(&mut self.cleared, 0b11);
let attachments: Vec<_> = (0..2)
let mut depth = std::mem::take(&mut self.fresh);
let cleared = std::mem::replace(&mut self.cleared, u8::MAX);
let attachments = (0..SHADOW_COLORS)
.filter(|n| cleared & 1 << n == 0)
.filter_map(|n| {
Some(Some(wgpu::RenderPassColorAttachment {
@@ -175,24 +178,30 @@ impl ShadowTargets {
resolve_target: None,
ops: clear(self.clears[n]?),
}))
})
.collect();
if !depth && attachments.is_empty() {
return;
});
let passes: Vec<Vec<_>> = attachments.map(|a| vec![a]).collect();
let passes = if passes.is_empty() && depth {
vec![Vec::new()]
} else {
passes
};
for attachments in &passes {
encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: Some("Shader pack shadow clear"),
color_attachments: attachments,
depth_stencil_attachment: std::mem::take(&mut depth).then_some(
wgpu::RenderPassDepthStencilAttachment {
view: &self.depth.1,
depth_ops: Some(wgpu::Operations {
load: wgpu::LoadOp::Clear(1.0),
store: wgpu::StoreOp::Store,
}),
stencil_ops: None,
},
),
..Default::default()
});
}
encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: Some("Shader pack shadow clear"),
color_attachments: &attachments,
depth_stencil_attachment: depth.then_some(wgpu::RenderPassDepthStencilAttachment {
view: &self.depth.1,
depth_ops: Some(wgpu::Operations {
load: wgpu::LoadOp::Clear(1.0),
store: wgpu::StoreOp::Store,
}),
stencil_ops: None,
}),
..Default::default()
});
}
/// `shadowtex1`: the shadow map as it is now (before translucent geometry).
@@ -265,6 +265,13 @@ pub const NAMES: &[&str] = &[
"playerMood",
"constantMood",
"centerDepthSmooth",
"alphaTestRef",
"entityId",
"blockEntityId",
"entityColor",
GBUFFERS_FOG_MODE,
GBUFFERS_FOG_SHAPE,
GBUFFERS_CENTER_DEPTH,
"isRightHanded",
"is_on_ground",
"bedrockLevel",
@@ -277,6 +284,13 @@ pub const NAMES: &[&str] = &[
"cloudHeight",
];
/// What programs that draw the game's geometry (gbuffers, shadow) read as `fogMode`,
/// `fogShape` and `centerDepthSmooth`: no GLSL name can hold a dot, so no pack reads these
/// directly.
const GBUFFERS_FOG_MODE: &str = "gbuffers.fogMode";
const GBUFFERS_FOG_SHAPE: &str = "gbuffers.fogShape";
const GBUFFERS_CENTER_DEPTH: &str = "gbuffers.centerDepthSmooth";
/// Values carried from frame to frame.
pub struct FrameUniforms {
pub values: Vec<Value>,
@@ -472,18 +486,16 @@ impl FrameUniforms {
});
}
let center_depth = self.center_depth.unwrap_or(1.0);
// Vanilla fades by the stronger of two linear fogs; a pack gets one: the pair (start
// and end together) of the one that is complete nearer (OQ-36). Mixing the nearer start
// of one with the nearer end of the other made fog begin at the camera on clear days.
// Vanilla fades by the stronger of two linear fogs; a pack gets the environmental one
// (`FogData::environmental_start`/`environmental_end`), as Iris 1.11.7 gives it in every
// program kind: 0 to 1024 on a clear day, -160 to 768 in rain, -8 to 96 under water, 10
// to 96 in the Nether (measured with a probe pack).
let (fog_color, fog_start, fog_end) = match &frame.fog {
Some(f) => {
let (start, end) = if f.environmental_end < f.render_distance_end {
(f.environmental_start, f.environmental_end)
} else {
(f.render_distance_start, f.render_distance_end)
};
([f.color[0], f.color[1], f.color[2]], start, end)
}
Some(f) => (
[f.color[0], f.color[1], f.color[2]],
f.environmental_start,
f.environmental_end,
),
None => (frame.sky.fog_color, frame.distance * 0.9, frame.distance),
};
let light = shadow_light(frame, &self.shadow);
@@ -545,12 +557,22 @@ impl FrameUniforms {
"thunderStrength" => Value::f(&[inputs.thunder]),
"fogColor" => Value::f(&fog_color),
"skyColor" => Value::f(&frame.sky.sky_color),
// GL_LINEAR: vanilla's fog is linear.
"fogMode" => Value::i(&[9729]),
// Iris 1.11.7, measured: programs that draw no geometry read no fog mode (0) and
// shape (-1); those that do read GL_LINEAR and a cylinder (1). The density is 0.
"fogMode" => Value::i(&[0]),
GBUFFERS_FOG_MODE => Value::i(&[9729]),
"fogStart" => Value::f(&[fog_start]),
"fogEnd" => Value::f(&[fog_end]),
"fogDensity" => Value::f(&[1.0]),
"fogShape" => Value::i(&[0]),
"fogDensity" => Value::f(&[0.0]),
"fogShape" => Value::i(&[-1]),
GBUFFERS_FOG_SHAPE => Value::i(&[1]),
// Iris 1.11.7 gives gbuffers programs 0 (measured in 16 scenes).
GBUFFERS_CENTER_DEPTH => Value::f(&[0.0]),
// Outside a draw (gbuffers programs get these per draw), as Iris 1.11.7 gives
// them to composite and final programs (measured).
"alphaTestRef" => Value::f(&[0.1]),
"blockEntityId" => Value::i(&[-1]),
"entityColor" => Value::f(&[0.0; 4]),
"isEyeInWater" => Value::i(&[inputs.eye_in]),
"blindness" => Value::f(&[inputs.blindness]),
"nightVision" => Value::f(&[frame.night_vision]),
@@ -690,6 +712,7 @@ fn components(name: &str) -> usize {
| "skyColor"
| "endFlashPosition" => 3,
"eyeBrightness" | "eyeBrightnessSmooth" | "atlasSize" => 2,
"entityColor" => 4,
n if n.starts_with("gbuffer") || n.starts_with("shadow") && n != "shadowAngle" => 16,
_ => 1,
}
@@ -700,6 +723,18 @@ pub fn index(name: &str) -> Option<usize> {
NAMES.iter().position(|n| *n == name)
}
/// The position in [`NAMES`] of the value a program reads as `name`; `geometry`: the program
/// draws the game's geometry (gbuffers, shadow), which reads its own fog mode and shape and no
/// centre depth.
pub fn index_in(name: &str, geometry: bool) -> Option<usize> {
match name {
"fogMode" if geometry => index(GBUFFERS_FOG_MODE),
"fogShape" if geometry => index(GBUFFERS_FOG_SHAPE),
"centerDepthSmooth" if geometry => index(GBUFFERS_CENTER_DEPTH),
_ => index(name),
}
}
#[cfg(test)]
mod tests {
use super::*;
@@ -1178,6 +1213,64 @@ mod initial_history_tests {
}
}
fn int(u: &FrameUniforms, at: usize) -> i32 {
match u.values[at] {
Value::I(v) => v[0],
_ => panic!("integer uniform expected"),
}
}
/// Iris 1.11.7, read back exactly with a probe pack on a clear day (render distance 12,
/// cloud range 64): fogStart 0 and fogEnd 1024 (the environmental fog, not the render
/// distance's 172.8 to 192), fogDensity 0; composite and final programs read alphaTestRef
/// 0.1, blockEntityId -1, fogMode 0 and fogShape -1.
#[test]
fn fog_and_draw_uniforms_outside_a_draw_follow_iris() {
let hud = HudBatch::new([800, 450]);
let mut f = frame(&hud);
f.fog = Some(crate::fog::FogData {
color: [0.7, 0.8, 1.0, 1.0],
environmental_start: 0.0,
environmental_end: 1024.0,
render_distance_start: 172.8,
render_distance_end: 192.0,
sky_end: 192.0,
cloud_end: 1024.0,
});
let mut u = FrameUniforms::default();
u.update(&f, &PackInputs::default(), [800, 450]);
assert_eq!(float(&u, "fogStart")[0], 0.0);
assert_eq!(float(&u, "fogEnd")[0], 1024.0);
assert_eq!(float(&u, "fogDensity")[0], 0.0);
assert_eq!(float(&u, "alphaTestRef")[0], 0.1);
assert_eq!(int(&u, index("blockEntityId").unwrap()), -1);
assert_eq!(int(&u, index("entityId").unwrap()), 0);
assert_eq!(int(&u, index("fogMode").unwrap()), 0);
assert_eq!(int(&u, index("fogShape").unwrap()), -1);
}
/// Iris 1.11.7 (probe pack): gbuffers programs read fogMode GL_LINEAR (9729) and fogShape 1
/// (cylinder) where composite and final programs read 0 and -1.
#[test]
fn programs_that_draw_geometry_read_their_own_fog_and_centre_depth() {
let hud = HudBatch::new([800, 450]);
let mut u = FrameUniforms::default();
u.update(&frame(&hud), &PackInputs::default(), [800, 450]);
let at = |name, geometry| index_in(name, geometry).unwrap();
assert_eq!(int(&u, at("fogMode", true)), 9729);
assert_eq!(int(&u, at("fogShape", true)), 1);
assert_eq!(int(&u, at("fogMode", false)), 0);
assert_eq!(int(&u, at("fogShape", false)), -1);
assert_eq!(at("fogStart", true), at("fogStart", false));
// Iris 1.11.7 (probe pack): `centerDepthSmooth` reads 0 in gbuffers programs.
let depth = |geometry| match u.values[at("centerDepthSmooth", geometry)] {
Value::F(v) => v[0],
_ => panic!("float uniform expected"),
};
assert_eq!(depth(true), 0.0);
assert_eq!(depth(false), 1.0);
}
/// Iris 1.11.7, read frame by frame with a probe pack: eyeBrightnessSmooth falls by half
/// in 1 s and is rounded down; wetness takes 60 s to rise halfway and 20 s to fall; the
/// centre depth 0.1 s.
@@ -162,7 +162,7 @@ impl PackWeather {
/// A texture holding the atlas's texels under `rect` (normalised x, y, width, height), as
/// Horizon's weather shader reads them (`weather_texel`).
fn copy_sprite(
pub(super) fn copy_sprite(
device: &wgpu::Device,
encoder: &mut wgpu::CommandEncoder,
atlas: &wgpu::Texture,
@@ -0,0 +1,417 @@
//! A visibility buffer for solid terrain, opt-in with `HORIZON_VISBUFFER=1` (read once, at
//! startup): pass 1 rasterises the solid flat draws (near sections and far tiles, phase 1 and,
//! with occlusion culling, phase 2) writing only depth and the ID of the quad each pixel shows
//! (`visbuffer.wgsl`'s `vis_id`: arena page and quad); cutout and fading
//! quads keep their alpha test and dither there, the rest never discard. Pass 2 is one
//! full-screen draw with up to `PAGE_SLOTS` arena pages bound at once (more pages, more draws)
//! that reads the quad back from its page and its section's origin (through a copy of every
//! drawn page's block table in one buffer), and runs terrain.wgsl's
//! vertex work and solid shading once per pixel with analytic screen gradients. Every solid
//! pixel is shaded once, however many quads were drawn over it and however small they are.
//! A draw per page instead made each GPU thread group run the shading once for every page
//! among its pixels, with most lanes idle: the pages' sections lie all over the screen.
//!
//! It runs only in frames drawn flat (`flat`: Metal past `flat::MIN_SECTIONS`, or
//! `HORIZON_FLAT_DRAWS=1`) and falls back to the normal solid passes in frames with a shader
//! pack drawing terrain, one of Horizon's own packs with a material stage or a shadow pass, a
//! pack's surface target, and on the title screen. The water mirror's own pass stays as it is.
use super::arena::Arena;
use super::flat::Flat;
use super::pack_timing::PassTiming;
/// Arena pages one resolve draw reads (`visbuffer.wgsl`'s `vis_page_0`...).
pub const PAGE_SLOTS: u32 = 16;
/// Arena pages an ID names (`visbuffer.wgsl`'s `vis_id`): frames with more draw without it.
pub const MAX_PAGES: u32 = 64;
/// The resolve binds that many pages, the block tables and the origins by section id.
const STORAGE_BUFFERS: u32 = PAGE_SLOTS + 2;
const IDS: wgpu::TextureFormat = wgpu::TextureFormat::R32Uint;
/// Whether the visibility buffer is asked for, and the device binds storage buffers enough.
pub fn wanted(device: &wgpu::Device) -> bool {
std::env::var("HORIZON_VISBUFFER").as_deref() == Ok("1")
&& device.limits().max_storage_buffers_per_shader_stage >= STORAGE_BUFFERS
}
pub struct Visbuffer {
/// Pass 1 over the quads `fs_opaque` draws (no discard) and the rest.
opaque: wgpu::RenderPipeline,
cutout: wgpu::RenderPipeline,
resolve: wgpu::RenderPipeline,
/// Pass 2's group 1: the block tables (binding 0), the origins by section id (1),
/// `PAGE_SLOTS` pages' vertices (from 2), the IDs (after them).
page_layout: wgpu::BindGroupLayout,
/// Every page's block table, page after page (`Flat::blocks_per_page` entries each),
/// copied each frame from the drawn pages' own, and its size in pages.
blocks: Option<(wgpu::Buffer, u32)>,
blocks_per_page: u64,
/// The IDs, the size of the world's depth.
ids: Option<(wgpu::TextureView, [u32; 2])>,
}
impl Visbuffer {
/// `terrain_layout`: terrain.wgsl's group 0; `flat_layout`: the flat draws' group 1;
/// `color`: the world pass's colour format; `constants`: the sprite arrays' pipeline
/// constants.
pub fn new(
device: &wgpu::Device,
terrain_layout: &wgpu::BindGroupLayout,
flat: &Flat,
color: wgpu::TextureFormat,
constants: &[(&str, f64)],
) -> Self {
let flat_layout = &flat.draw_layout;
let blocks_per_page = flat.blocks_per_page();
let resolve_constants: Vec<(&str, f64)> = constants
.iter()
.copied()
.chain([("VIS_BLOCKS_PER_PAGE", blocks_per_page as f64)])
.collect();
let module = device.create_shader_module(wgpu::ShaderModuleDescriptor {
label: Some("Horizon visibility buffer"),
source: wgpu::ShaderSource::Wgsl(
(include_str!("../terrain.wgsl").to_owned() + include_str!("../visbuffer.wgsl"))
.into(),
),
});
let fragment = wgpu::ShaderStages::FRAGMENT;
let storage = |binding| wgpu::BindGroupLayoutEntry {
binding,
visibility: fragment,
ty: wgpu::BindingType::Buffer {
ty: wgpu::BufferBindingType::Storage { read_only: true },
has_dynamic_offset: false,
min_binding_size: None,
},
count: None,
};
let entries: Vec<_> = (0..2 + PAGE_SLOTS)
.map(storage)
.chain([wgpu::BindGroupLayoutEntry {
binding: 2 + PAGE_SLOTS,
visibility: fragment,
ty: wgpu::BindingType::Texture {
sample_type: wgpu::TextureSampleType::Uint,
view_dimension: wgpu::TextureViewDimension::D2,
multisampled: false,
},
count: None,
}])
.collect();
let page_layout = device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor {
label: Some("Visibility buffer pages"),
entries: &entries,
});
let id_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
label: Some("Visibility buffer IDs"),
bind_group_layouts: &[Some(terrain_layout), Some(flat_layout)],
..Default::default()
});
let resolve_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
label: Some("Visibility buffer resolve"),
bind_group_layouts: &[Some(terrain_layout), Some(&page_layout)],
..Default::default()
});
let ids = |label: &'static str, vertex: &'static str, fragment: &'static str| {
device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
label: Some(label),
layout: Some(&id_layout),
vertex: wgpu::VertexState {
module: &module,
entry_point: Some(vertex),
compilation_options: Default::default(),
// `section_corner` reads the arena page (`flat::ARENA_BINDING`).
buffers: &[],
},
primitive: wgpu::PrimitiveState {
topology: wgpu::PrimitiveTopology::TriangleList,
cull_mode: Some(wgpu::Face::Back),
..Default::default()
},
depth_stencil: Some(wgpu::DepthStencilState {
format: wgpu::TextureFormat::Depth32Float,
depth_write_enabled: Some(true),
depth_compare: Some(wgpu::CompareFunction::GreaterEqual),
stencil: Default::default(),
bias: Default::default(),
}),
multisample: Default::default(),
fragment: Some(wgpu::FragmentState {
module: &module,
entry_point: Some(fragment),
compilation_options: wgpu::PipelineCompilationOptions {
constants,
..Default::default()
},
targets: &[Some(wgpu::ColorTargetState {
format: IDS,
blend: None,
write_mask: wgpu::ColorWrites::ALL,
})],
}),
multiview_mask: None,
cache: None,
})
};
let opaque = ids("Visibility buffer opaque", "vs_vis_opaque", "fs_vis_id");
let cutout = ids("Visibility buffer cutout", "vs_vis_cutout", "fs_vis_cutout");
let resolve = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
label: Some("Visibility buffer resolve"),
layout: Some(&resolve_layout),
vertex: wgpu::VertexState {
module: &module,
entry_point: Some("vs_vis_resolve"),
compilation_options: Default::default(),
buffers: &[],
},
primitive: Default::default(),
depth_stencil: None,
multisample: Default::default(),
fragment: Some(wgpu::FragmentState {
module: &module,
entry_point: Some("fs_vis_resolve"),
compilation_options: wgpu::PipelineCompilationOptions {
constants: &resolve_constants,
..Default::default()
},
targets: &[Some(wgpu::ColorTargetState {
format: color,
blend: None,
write_mask: wgpu::ColorWrites::ALL,
})],
}),
multiview_mask: None,
cache: None,
});
Self {
opaque,
cutout,
resolve,
page_layout,
blocks: None,
blocks_per_page,
ids: None,
}
}
/// Makes the IDs the world depth's `size`, and the block tables hold the pages `flat`
/// draws this frame.
pub fn fit(&mut self, device: &wgpu::Device, size: [u32; 2], flat: &Flat) {
let pages = flat.calls[..flat.solid_calls]
.iter()
.map(|c| c.page + 1)
.max()
.unwrap_or(1);
if self.blocks.as_ref().is_none_or(|(_, n)| *n < pages) {
let pages = pages.next_power_of_two();
let buffer = device.create_buffer(&wgpu::BufferDescriptor {
label: Some("Visibility buffer block tables"),
size: u64::from(pages) * self.blocks_per_page * 4,
usage: wgpu::BufferUsages::STORAGE | wgpu::BufferUsages::COPY_DST,
mapped_at_creation: false,
});
self.blocks = Some((buffer, pages));
}
if self.ids.as_ref().is_some_and(|(_, s)| *s == size) {
return;
}
let texture = device.create_texture(&wgpu::TextureDescriptor {
label: Some("Visibility buffer IDs"),
size: wgpu::Extent3d {
width: size[0].max(1),
height: size[1].max(1),
depth_or_array_layers: 1,
},
mip_level_count: 1,
sample_count: 1,
dimension: wgpu::TextureDimension::D2,
format: IDS,
usage: wgpu::TextureUsages::RENDER_ATTACHMENT | wgpu::TextureUsages::TEXTURE_BINDING,
view_formats: &[],
});
self.ids = Some((texture.create_view(&Default::default()), size));
}
/// Pass 1's render pass over the world's `depth`: the IDs cleared (`clear`, phase 1) or
/// kept (phase 2 of occlusion culling).
pub fn id_pass<'e>(
&self,
encoder: &'e mut wgpu::CommandEncoder,
depth: &wgpu::TextureView,
clear: bool,
timing: Option<&mut PassTiming>,
) -> wgpu::RenderPass<'e> {
let (ids, _) = self.ids.as_ref().expect("fitted before the world pass");
let name = if clear {
"Visibility IDs"
} else {
"Visibility IDs after culling"
};
encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: Some("Horizon visibility buffer"),
timestamp_writes: timing.and_then(|t| t.writes(name)),
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
view: ids,
resolve_target: None,
depth_slice: None,
ops: wgpu::Operations {
load: if clear {
wgpu::LoadOp::Clear(wgpu::Color::TRANSPARENT)
} else {
wgpu::LoadOp::Load
},
store: wgpu::StoreOp::Store,
},
})],
depth_stencil_attachment: Some(wgpu::RenderPassDepthStencilAttachment {
view: depth,
depth_ops: Some(wgpu::Operations {
load: wgpu::LoadOp::Load,
store: wgpu::StoreOp::Store,
}),
stencil_ops: None,
}),
..Default::default()
})
}
/// Phase 1's solid calls into the IDs, as the normal passes draw them: the opaque
/// pipeline over `calls[..pass_calls[0]]`, the cutout one over
/// `calls[pass_calls[1]..phase1_calls]` (each leaves out the other's quads).
pub fn draw_ids<'a>(
&self,
pass: &mut wgpu::RenderPass<'_>,
flat: &Flat,
vertices: impl Fn(u32) -> wgpu::BufferSlice<'a> + Copy,
) {
let [opaque, cutout, _] = flat.pass_calls;
pass.set_pipeline(&self.opaque);
flat.draw_paged(pass, &flat.calls[..opaque], vertices);
pass.set_pipeline(&self.cutout);
flat.draw_paged(pass, &flat.calls[cutout..flat.phase1_calls], vertices);
}
/// Phase 2's calls as `Flat::flatten_phase2` left them (their first instance is their
/// page: `Flat::page_instances`), through both pipelines.
pub fn draw_ids_phase2<'a>(
&self,
pass: &mut wgpu::RenderPass<'_>,
flat: &Flat,
vertices: impl Fn(u32) -> wgpu::BufferSlice<'a> + Copy,
) {
// Phase 2 lists each section's opaque runs first, its cutout runs after.
let split = flat.pass_calls[2] - flat.phase1_calls;
let total = flat.solid_calls - flat.phase1_calls;
pass.set_pipeline(&self.opaque);
flat.draw_phase2(pass, 0..split, vertices);
pass.set_pipeline(&self.cutout);
flat.draw_phase2(pass, split..total, vertices);
}
/// Bytes of its block tables and IDs.
pub fn bytes(&self) -> u64 {
let blocks = self.blocks.as_ref().map_or(0, |(b, _)| b.size());
let ids = self
.ids
.as_ref()
.map_or(0, |(_, [w, h])| u64::from(*w) * u64::from(*h) * 4);
blocks + ids
}
/// Pass 2: shades the solid terrain the IDs show into `target`, the world's colour,
/// over the sky drawn before. `terrain`: terrain.wgsl's group 0.
#[allow(clippy::too_many_arguments)]
pub fn resolve(
&self,
device: &wgpu::Device,
encoder: &mut wgpu::CommandEncoder,
target: &wgpu::TextureView,
terrain: &wgpu::BindGroup,
flat: &Flat,
arena: &Arena,
timing: Option<&mut PassTiming>,
) {
let (Some((ids, _)), Some((blocks, _))) = (&self.ids, &self.blocks) else {
return;
};
let mut pages: Vec<u32> = flat.calls[..flat.solid_calls]
.iter()
.map(|c| c.page)
.collect();
pages.sort_unstable();
pages.dedup();
let Some(&any) = pages.first() else {
return;
};
let table = self.blocks_per_page * 4;
for &page in &pages {
if let Some(from) = flat.block_table(page) {
encoder.copy_buffer_to_buffer(from, 0, blocks, u64::from(page) * table, table);
}
}
// Pages in groups of `PAGE_SLOTS` by number: a page's slot is its number's remainder.
// Slots no drawn page fills take one that is, which no pixel's ID names.
let mut chunks: Vec<u32> = pages.iter().map(|p| p / PAGE_SLOTS).collect();
chunks.dedup();
let groups: Vec<(u32, wgpu::BindGroup)> = chunks
.into_iter()
.map(|chunk| {
let mut entries = vec![
wgpu::BindGroupEntry {
binding: 0,
resource: blocks.as_entire_binding(),
},
wgpu::BindGroupEntry {
binding: 1,
resource: flat.origins().as_entire_binding(),
},
];
entries.extend((0..PAGE_SLOTS).map(|slot| {
let page = chunk * PAGE_SLOTS + slot;
let page = if pages.binary_search(&page).is_ok() {
page
} else {
any
};
wgpu::BindGroupEntry {
binding: 2 + slot,
resource: arena.buffer(page).as_entire_binding(),
}
}));
entries.push(wgpu::BindGroupEntry {
binding: 2 + PAGE_SLOTS,
resource: wgpu::BindingResource::TextureView(ids),
});
let group = device.create_bind_group(&wgpu::BindGroupDescriptor {
label: Some("Visibility buffer pages"),
layout: &self.page_layout,
entries: &entries,
});
(chunk, group)
})
.collect();
let mut pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: Some("Horizon visibility buffer resolve"),
timestamp_writes: timing.and_then(|t| t.writes("Visibility resolve")),
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
view: target,
resolve_target: None,
depth_slice: None,
ops: wgpu::Operations {
load: wgpu::LoadOp::Load,
store: wgpu::StoreOp::Store,
},
})],
depth_stencil_attachment: None,
..Default::default()
});
pass.set_pipeline(&self.resolve);
pass.set_bind_group(0, terrain, &[]);
// The group of pages goes as the instance: each draw shades the pixels whose quad is
// in one of its pages (one draw, up to `PAGE_SLOTS` pages).
for (chunk, group) in &groups {
pass.set_bind_group(1, group, &[]);
pass.draw(0..3, *chunk..*chunk + 1);
}
}
}
+66 -2
View File
@@ -128,6 +128,44 @@ impl EntityCullingMode {
}
}
/// Particle visibility strategy, independent of Entity Culling.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)]
pub enum ParticleCullingMode {
#[default]
Off,
Synchronous,
Asynchronous,
}
impl ParticleCullingMode {
pub const ALL: [ParticleCullingMode; 3] = [
ParticleCullingMode::Off,
ParticleCullingMode::Synchronous,
ParticleCullingMode::Asynchronous,
];
pub fn name(self) -> &'static str {
match self {
Self::Off => "off",
Self::Synchronous => "sync",
Self::Asynchronous => "async",
}
}
pub fn label(self) -> &'static str {
match self {
Self::Off => "Off",
Self::Synchronous => "Synchronous",
Self::Asynchronous => "Asynchronous",
}
}
fn parse(s: &str) -> Self {
match s {
"synchronous" | "sync" => Self::Synchronous,
"asynchronous" | "async" => Self::Asynchronous,
"off" => Self::Off,
_ => Self::default(),
}
}
}
/// How the swapchain presents frames.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)]
pub enum PresentMode {
@@ -333,6 +371,13 @@ pub enum LeafCullingMode {
/// Every leaf face, as vanilla's fancy leaves draw them.
#[default]
Off,
/// Drops a face between two leaves when the leaf it faces has a leaf or
/// a full opaque cube behind it too: that face only shows through two
/// cutout layers. The faces behind the outer layer stay, so a crown
/// looks the same from outside. The faced leaf must be in the section
/// (as `Hollow`), so the block behind it is at most a border cell of the
/// next section, whose edits remesh this one.
Hidden,
/// Leaves surrounded on all six sides by leaves or full opaque cubes draw
/// in the opaque layer, so their cutouts no longer show the layers behind.
Solid,
@@ -344,8 +389,9 @@ pub enum LeafCullingMode {
Hollow,
}
impl LeafCullingMode {
pub const ALL: [LeafCullingMode; 4] = [
pub const ALL: [LeafCullingMode; 5] = [
LeafCullingMode::Off,
LeafCullingMode::Hidden,
LeafCullingMode::Solid,
LeafCullingMode::SolidAggressive,
LeafCullingMode::Hollow,
@@ -353,6 +399,7 @@ impl LeafCullingMode {
pub fn name(self) -> &'static str {
match self {
LeafCullingMode::Off => "off",
LeafCullingMode::Hidden => "hidden",
LeafCullingMode::Solid => "solid",
LeafCullingMode::SolidAggressive => "solid_aggressive",
LeafCullingMode::Hollow => "hollow",
@@ -361,6 +408,7 @@ impl LeafCullingMode {
pub fn label(self) -> &'static str {
match self {
LeafCullingMode::Off => "Off",
LeafCullingMode::Hidden => "Hidden Faces",
LeafCullingMode::Solid => "Solid",
LeafCullingMode::SolidAggressive => "Solid Aggressive",
LeafCullingMode::Hollow => "Hollow",
@@ -551,6 +599,8 @@ pub struct Graphics {
pub cave_culling: bool,
/// Skip drawing entities hidden behind opaque terrain, synchronously or asynchronously.
pub entity_culling: EntityCullingMode,
/// Skip particles outside the view or hidden behind opaque terrain.
pub particle_culling: ParticleCullingMode,
/// Terrain leaf faces inside a canopy (see [`LeafCullingMode`]); `Off` draws
/// vanilla's fancy leaves. Ignored with a resource pack that may replace
/// the vanilla leaf models ([`Graphics::leaf_culling_effective`]).
@@ -648,6 +698,7 @@ impl Default for Graphics {
blue_map: crate::bluemap::Settings::default(),
cave_culling: true,
entity_culling: EntityCullingMode::Off,
particle_culling: ParticleCullingMode::Off,
leaf_culling: LeafCullingMode::Off,
cache_shulker_boxes: false,
// Sign text has used its renderer cache independently of the new model caches.
@@ -741,6 +792,7 @@ impl Graphics {
"blueMapAutoDetect" => g.blue_map.auto_detect = flag(g.blue_map.auto_detect),
"caveCulling" => g.cave_culling = flag(g.cave_culling),
"entityCulling" => g.entity_culling = EntityCullingMode::parse(value),
"particleCulling" => g.particle_culling = ParticleCullingMode::parse(value),
"leafCulling" => g.leaf_culling = LeafCullingMode::parse(value),
"blockEntityCache" => {
let enabled = flag(false);
@@ -831,12 +883,13 @@ impl Graphics {
}
pub fn serialize(&self) -> String {
let mut text = format!(
"preset:{}\nlodDistance:{}\nfarDetail:{}\ncaveCulling:{}\nentityCulling:{}\nleafCulling:{}\nblockEntityCacheShulkerBoxes:{}\nblockEntityCacheSigns:{}\nblockEntityCacheDecoratedPots:{}\nblockEntityCacheBells:{}\nblockEntityCacheChests:{}\nblockEntityCacheBanners:{}\nblockEntityCacheCopperGolemStatues:{}\nchunkUpdates:{}\nuploadBudgetKiB:{}\ntextureBudgetMiB:{}\nsky:{}\nfog:{}\nweather:{}\nanimatedTextures:{}\nditherCutoutMips:{}\npresentMode:{}\nframePacing:{}\nworkers:{}\noverlay:{}\nresolutionScale:{}\nfxaa:{}\ntaa:{}\nupscaling:{}\nscreenshotQuality:{}\nframeGeneration:{}\nhdr:{}\nhdrPaperWhite:{}\nhdrPeak:{}\nhdrBlackLevel:{}\nhdrUiBrightness:{}\nhdrKey:{}\nbatteryMode:{}\nshadowCache:{}\ngraphicsApi:{}\npickedShaderPack:{}\nbatchTranslucent:{}\n",
"preset:{}\nlodDistance:{}\nfarDetail:{}\ncaveCulling:{}\nentityCulling:{}\nparticleCulling:{}\nleafCulling:{}\nblockEntityCacheShulkerBoxes:{}\nblockEntityCacheSigns:{}\nblockEntityCacheDecoratedPots:{}\nblockEntityCacheBells:{}\nblockEntityCacheChests:{}\nblockEntityCacheBanners:{}\nblockEntityCacheCopperGolemStatues:{}\nchunkUpdates:{}\nuploadBudgetKiB:{}\ntextureBudgetMiB:{}\nsky:{}\nfog:{}\nweather:{}\nanimatedTextures:{}\nditherCutoutMips:{}\npresentMode:{}\nframePacing:{}\nworkers:{}\noverlay:{}\nresolutionScale:{}\nfxaa:{}\ntaa:{}\nupscaling:{}\nscreenshotQuality:{}\nframeGeneration:{}\nhdr:{}\nhdrPaperWhite:{}\nhdrPeak:{}\nhdrBlackLevel:{}\nhdrUiBrightness:{}\nhdrKey:{}\nbatteryMode:{}\nshadowCache:{}\ngraphicsApi:{}\npickedShaderPack:{}\nbatchTranslucent:{}\n",
self.preset.name(),
self.lod_distance,
self.far_detail.name(),
bool_text(self.cave_culling),
self.entity_culling.name(),
self.particle_culling.name(),
self.leaf_culling.name(),
bool_text(self.cache_shulker_boxes),
bool_text(self.cache_signs),
@@ -1015,6 +1068,7 @@ mod tests {
},
cave_culling: false,
entity_culling: EntityCullingMode::Synchronous,
particle_culling: ParticleCullingMode::Asynchronous,
leaf_culling: LeafCullingMode::SolidAggressive,
cache_shulker_boxes: true,
cache_signs: true,
@@ -1061,6 +1115,16 @@ mod tests {
};
assert_eq!(Graphics::parse(&graphics.serialize()), graphics);
}
for mode in ParticleCullingMode::ALL {
let graphics = Graphics {
particle_culling: mode,
..Graphics::default()
};
assert_eq!(
Graphics::parse(&graphics.serialize()).particle_culling,
mode
);
}
assert_eq!(
Graphics::parse("entityCulling:true\n").entity_culling,
EntityCullingMode::Synchronous
@@ -7,7 +7,7 @@
use crate::{
graphics::{
EntityCullingMode, FarDetail, FrameGeneration, GraphicsApi, LeafCullingMode, Overlay,
Pacing, PresentMode, Preset, Upscaling,
Pacing, ParticleCullingMode, PresentMode, Preset, Upscaling,
},
graphics_style::{self as style, Cost},
hud::{HudAtlas, HudBatch},
@@ -66,6 +66,7 @@ pub enum H {
BlueMapRadius,
CaveCulling,
EntityCulling,
ParticleCulling,
LeafCulling,
CacheShulkerBoxes,
CacheSigns,
@@ -379,6 +380,11 @@ pub fn rows() -> Vec<(Page, Vec<(&'static str, Vec<Setting>)>)> {
None,
"Hides entities behind opaque blocks.",
),
h(
H::ParticleCulling,
None,
"Skips offscreen, subpixel and terrain-hidden particles.",
),
h(
H::LeafCulling,
Saves,
@@ -620,6 +626,9 @@ fn description(item: Item, s: &Settings, text: &'static str) -> &'static str {
},
(Item::Horizon(H::LeafCulling), _) => match s.horizon.leaf_culling {
LeafCullingMode::Off => "Every leaf face. Vanilla's fancy leaves.",
LeafCullingMode::Hidden => {
"Drops leaf faces behind two leaf layers: faster, same crowns."
}
LeafCullingMode::Solid => {
"Leaves fully inside a canopy draw solid: fewer see-through layers."
}
@@ -628,6 +637,15 @@ fn description(item: Item, s: &Settings, text: &'static str) -> &'static str {
}
LeafCullingMode::Hollow => "Drops faces between leaves: faster, but gaps look through.",
},
(Item::Horizon(H::ParticleCulling), _) => match s.horizon.particle_culling {
ParticleCullingMode::Off => "Draws every particle.",
ParticleCullingMode::Synchronous => {
"Skips offscreen, subpixel and terrain-hidden particles."
}
ParticleCullingMode::Asynchronous => {
"Skips offscreen, subpixel and terrain-hidden particles with less render-thread work."
}
},
_ => text,
}
}
@@ -719,6 +737,7 @@ impl H {
),
H::CaveCulling => labelled("Cave Culling", on_off(g.cave_culling)),
H::EntityCulling => labelled("Entity Culling", g.entity_culling.label()),
H::ParticleCulling => labelled("Particle Culling", g.particle_culling.label()),
H::LeafCulling => labelled("Leaf Culling", g.leaf_culling.label()),
H::CacheShulkerBoxes => labelled("Shulker Boxes", on_off(g.cache_shulker_boxes)),
H::CacheSigns => labelled("Signs", on_off(g.cache_signs)),
@@ -871,6 +890,9 @@ impl H {
H::EntityCulling => {
g.entity_culling = step(&EntityCullingMode::ALL, g.entity_culling, back)
}
H::ParticleCulling => {
g.particle_culling = step(&ParticleCullingMode::ALL, g.particle_culling, back)
}
H::LeafCulling => {
g.leaf_culling = step(&LeafCullingMode::ALL, g.leaf_culling, back);
}
@@ -2991,6 +3013,42 @@ mod tests {
assert_eq!(item.label(&s).plain(), "Entity Culling: Asynchronous");
}
#[test]
fn particle_culling_modes_are_opt_in_and_cycle_from_its_row() {
let mut s = Settings::default();
let item = Item::Horizon(H::ParticleCulling);
assert_eq!(s.horizon.particle_culling, ParticleCullingMode::Off);
assert_eq!(item.label(&s).plain(), "Particle Culling: Off");
for mode in ParticleCullingMode::ALL {
s.horizon.particle_culling = mode;
for preset in Preset::ALL {
crate::graphics::apply_preset(preset, &mut s);
assert_eq!(s.horizon.particle_culling, mode);
}
assert_eq!(
crate::graphics::Graphics::parse(&s.horizon.serialize()).particle_culling,
mode
);
}
s.horizon.particle_culling = ParticleCullingMode::Off;
let mut ui = GraphicsUi::default();
let r = row(&mut ui, &s, item);
for (mode, label) in [
(ParticleCullingMode::Synchronous, "Synchronous"),
(ParticleCullingMode::Asynchronous, "Asynchronous"),
(ParticleCullingMode::Off, "Off"),
] {
s.horizon.preset = Preset::Balanced;
assert_eq!(
press(&mut ui, &mut s, (r[0] + 4.0, r[1] + 4.0)),
[Action::ButtonClick, Action::Changed]
);
assert_eq!(s.horizon.particle_culling, mode);
assert_eq!(s.horizon.preset, Preset::Custom);
assert_eq!(item.label(&s).plain(), format!("Particle Culling: {label}"));
}
}
#[test]
fn graphics_cycle_button_cycles_forward_and_shift_click_cycles_backward_with_wrapping() {
let mut s = Settings::default();
@@ -3098,7 +3156,7 @@ mod tests {
let item = Item::Horizon(H::LeafCulling);
assert_eq!(item.switch(&s), None);
assert_eq!(item.label(&s).plain(), "Leaf Culling: Off");
for label in ["Solid", "Solid Aggressive", "Hollow", "Off"] {
for label in ["Hidden Faces", "Solid", "Solid Aggressive", "Hollow", "Off"] {
item.cycle(&mut s, false, FB);
assert_eq!(item.label(&s).plain(), format!("Leaf Culling: {label}"));
assert_eq!(
@@ -3117,7 +3175,12 @@ mod tests {
.unwrap();
assert_eq!(culling.0, Page::Performance);
let block: Vec<Item> = culling.1.iter().map(|r| r.item).collect();
for h in [H::CaveCulling, H::EntityCulling, H::LeafCulling] {
for h in [
H::CaveCulling,
H::EntityCulling,
H::ParticleCulling,
H::LeafCulling,
] {
assert!(block.contains(&Item::Horizon(h)), "{h:?}");
}
// The block-entity caches are the group after it, in this order.
@@ -3168,7 +3231,7 @@ mod tests {
press(&mut ui, &mut s, (r[0] + 4.0, r[1] + 4.0)),
[Action::ButtonClick, Action::Changed]
);
assert_eq!(s.horizon.leaf_culling, LeafCullingMode::Solid);
assert_eq!(s.horizon.leaf_culling, LeafCullingMode::Hidden);
assert_eq!(s.horizon.preset, Preset::Custom);
}
@@ -3333,36 +3396,47 @@ mod tests {
let mut s = Settings::default();
s.horizon.leaf_culling = LeafCullingMode::Hollow;
s.horizon.entity_culling = EntityCullingMode::Asynchronous;
for (code, leaf, entity, leaf_text) in [
s.horizon.particle_culling = ParticleCullingMode::Asynchronous;
for (code, leaf, entity, leaf_text, particle, particle_text) in [
(
"de_de",
"Laub-Culling: Hohl",
"Objekt-Culling: Asynchron",
"Lässt Flächen zwischen Blättern weg: schneller, aber Lücken sind durchsichtig.",
"Partikel-Culling: Asynchron",
"Überspringt Partikel außerhalb des Bildes, unterhalb eines Pixels oder hinter Terrain und entlastet den Render-Thread.",
),
(
"pl_pl",
"Pomijanie liści: Puste",
"Pomijanie bytów: Asynchroniczne",
"Pomija ściany między liśćmi: szybciej, ale luki są przezroczyste.",
"Pomijanie cząsteczek: Asynchroniczne",
"Pomija cząsteczki poza ekranem, mniejsze niż piksel i zasłonięte przez teren, odciążając wątek renderowania.",
),
(
"uk_ua",
"Відсікання листя: Порожнє",
"Відсік. сутностей: Асинхронно",
"Прибирає грані між листям: швидше, але прогалини прозорі.",
"Відсікання частинок: Асинхронно",
"Пропускає частинки поза екраном, менші за піксель і закриті місцевістю, зменшуючи роботу потоку рендерингу.",
),
(
"zh_cn",
"树叶剔除: 镂空",
"实体剔除: 异步",
"省略树叶之间的面:更快,但缝隙会透视。",
"粒子剔除: 异步",
"跳过屏幕外、小于一个像素和被地形遮挡的粒子,减少渲染线程的工作量。",
),
(
"fr_fr",
"Occlusion feuillage: Creux",
"Occlusion des entités: Asynchrone",
"Supprime les faces entre feuilles : plus rapide, mais on voit à travers les trous.",
"Occlusion des particules: Asynchrone",
"Ignore les particules hors écran, trop petites ou masquées par le terrain avec moins de travail sur le thread de rendu.",
),
] {
let (shown, _) = lang::scoped(lang::Language::load(&[], code), || {
@@ -3371,11 +3445,19 @@ mod tests {
item(H::LeafCulling).label(&s).plain(),
item(H::EntityCulling).label(&s).plain(),
lang::get(description(item(H::LeafCulling), &s, "")),
item(H::ParticleCulling).label(&s).plain(),
lang::get(description(item(H::ParticleCulling), &s, "")),
)
});
assert_eq!(
shown,
(leaf.into(), entity.into(), leaf_text.into()),
(
leaf.into(),
entity.into(),
leaf_text.into(),
particle.into(),
particle_text.into(),
),
"{code}"
);
}
+7 -1
View File
@@ -3008,8 +3008,14 @@ mod tests {
}
/// A resource root holding one animated block texture: a strip of two
/// 16x16 frames, red then blue, whose mcmeta starts on the blue one.
/// Each call gets its own folder: tests run side by side, and one adds
/// a strip of its own that another would otherwise find.
fn animated_root() -> PathBuf {
let root = std::env::temp_dir().join(format!("horizon-atlas-anim-{}", std::process::id()));
static NEXT: std::sync::atomic::AtomicU32 = std::sync::atomic::AtomicU32::new(0);
let n = NEXT.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
let root =
std::env::temp_dir().join(format!("horizon-atlas-anim-{}-{n}", std::process::id()));
let _ = fs::remove_dir_all(&root);
let block = root.join("assets/minecraft/textures/block");
fs::create_dir_all(&block).unwrap();
write_strip(
+52 -15
View File
@@ -38,10 +38,27 @@ const QUEUED_PER_SAMPLER: usize = 32;
const MAX_REFRESHED: usize = 64;
/// Threads that sample far tiles beside the mesher. Sampling is the cold-load
/// bottleneck (each task evaluates a shared density lattice for 256 columns),
/// so medium machines use half their cores, not a quarter.
/// so medium machines use two thirds of their cores, not half.
///
/// The mesher has little to do until tiles are sampled, so its threads sit
/// idle through the part of a cold build that waits on sampling. Measured on
/// a 12-thread machine building 4336 tiles at LOD distance 256, from the game
/// answering the control socket until every target tile is sampled, four runs
/// a configuration:
///
/// | samplers / meshers | sampling | whole build |
/// |---|---|---|
/// | 6 / 5 (before) | 15.0 s | 23.9 s |
/// | 8 / 3 | 11.8 s | 18.6 s |
/// | 9 / 2 | 10.6 s | 19.1 s |
///
/// Nine samplers finish sampling sooner still, but leave the mesher two
/// threads and the whole build ends later. The cap keeps a large machine
/// from starving its mesher, and `meshing_threads` keeps the frame and the
/// ticks a core either way.
fn sampling_threads(cores: usize) -> usize {
if cores >= 8 {
(cores / 2).min(8)
(cores * 2 / 3).min(8)
} else {
(cores / 4).clamp(1, 3)
}
@@ -179,7 +196,11 @@ pub struct Column {
}
impl Column {
/// Reduce an entire horizontal footprint, rather than inflating its corner
/// column (a single leaf used to become a whole distant tree-sized slab).
/// column. A height is drawn where any column of the footprint holds a
/// block there, in the material most of them hold: anything joined to
/// the ground stays joined at every width. Drawing only heights most of
/// the footprint held dropped trunks (one column of 16 or 256) under the
/// crowns they hold up, and the crowns hung in the air as slabs.
pub fn reduced(columns: &[Column; 256], x: usize, z: usize, width: usize) -> Self {
if width == 1 {
return columns[z * 16 + x].clone();
@@ -203,7 +224,7 @@ impl Column {
let mut bottom = MIN_Y as i16;
for (y, material, change) in events {
if bottom < y {
if occupied * 2 >= (width * width) as i32
if occupied > 0
&& let Some(&((state, biome), _)) =
votes.iter().max_by_key(|&(material, count)| {
(*count, std::cmp::Reverse((material.0.0, material.1)))
@@ -3291,7 +3312,7 @@ mod tests {
assert_eq!(kelp.surface.unwrap().height, 40);
}
#[test]
fn coarse_voxels_reduce_the_area_instead_of_inflating_one_leaf() {
fn coarse_voxels_keep_what_any_column_holds_so_crowns_stay_on_trunks() {
let span = |min, max, state| Span {
min,
max,
@@ -3303,8 +3324,8 @@ mod tests {
surface: None,
spans: vec![span(0, 4, 1)].into(),
});
columns[0].spans.push(span(8, 10, 2));
assert_eq!(Column::reduced(&columns, 0, 0, 4).spans, [span(0, 4, 1)]);
// One trunk column under a crown over the whole footprint.
columns[0].spans.push(span(4, 12, 2));
for z in 0..4 {
for x in 0..4 {
columns[z * 16 + x].spans.push(span(12, 14, 3));
@@ -3312,17 +3333,20 @@ mod tests {
}
assert_eq!(
Column::reduced(&columns, 0, 0, 4).spans,
[span(0, 4, 1), span(12, 14, 3)]
[span(0, 4, 1), span(4, 12, 2), span(12, 14, 3)]
);
assert_eq!(Column::reduced(&columns, 0, 0, 1), columns[0]);
let reduced = ReducedColumns::new(Arc::new(columns));
assert_eq!(
reduced.get(0, 0, 1).spans,
[span(0, 4, 1), span(8, 10, 2), span(12, 14, 3)]
reduced.get(0, 0, 4).spans,
[span(0, 4, 1), span(4, 12, 2), span(12, 14, 3)]
);
assert_eq!(reduced.get(0, 0, 4).spans, [span(0, 4, 1), span(12, 14, 3)]);
assert_eq!(reduced.get(4, 8, 4).spans, [span(0, 4, 1)]);
assert_eq!(reduced.get(0, 0, 16).spans, [span(0, 4, 1)]);
assert_eq!(
reduced.get(0, 0, 16).spans,
[span(0, 4, 1), span(4, 12, 2), span(12, 14, 3)],
"a crown over one corner of a wide cell still sits on its trunk"
);
}
/// Detail read before a refresh over its chunk is dropped (asked
/// again); elsewhere, or read after, it is kept.
@@ -4028,9 +4052,22 @@ mod tests {
}
#[test]
fn extra_sampling_threads_only_on_large_machines() {
assert_eq!([1, 2, 4, 8, 11].map(sampling_threads), [1, 1, 1, 4, 5]);
assert_eq!([12, 16, 64].map(sampling_threads), [6, 8, 8]);
assert_eq!([2, 8, 12, 16].map(meshing_threads), [1, 3, 5, 7]);
// Small machines are unchanged: a quarter of their cores, never more
// than three, so the near chunks and the frame keep theirs.
assert_eq!([1, 2, 4].map(sampling_threads), [1, 1, 1]);
// From eight, two thirds rather than half, still capped at eight.
assert_eq!([8, 11, 12].map(sampling_threads), [5, 7, 8]);
assert_eq!([16, 64].map(sampling_threads), [8, 8]);
assert_eq!([2, 8, 12, 16].map(meshing_threads), [1, 2, 3, 7]);
// From four cores up the two pools together leave one for the frame
// and the ticks. Below that both clamp to one and there is nothing
// to spare, which is the existing behaviour.
for cores in [4usize, 8, 11, 12, 16, 64] {
assert!(
sampling_threads(cores) + meshing_threads(cores) < cores,
"{cores} cores leaves nothing for the frame"
);
}
}
/// Review point 3 on #4747: a result from a batch that is no longer the
+57 -12
View File
@@ -6,6 +6,7 @@
mod fluid;
mod leaf_culling;
mod lighting;
pub mod packed;
mod sides;
use crate::connected::{Pick, TileLayer};
use crate::{
@@ -265,6 +266,12 @@ pub struct SectionMesh {
/// model order before.
pub sides: Sides,
pub translucent: Vec<TerrainVertex>,
/// `solid` in the compact layout (`packed`), when the renderer reads it and it is
/// smaller; empty otherwise. Made by `sort_solid`.
pub packed: Vec<[u32; 6]>,
/// The tint of each solid quad as the mesher multiplied it (`packed::UNKNOWN_TINT` where
/// it does not say), for `packed`; dropped once that is made.
pub(crate) solid_tints: Vec<u32>,
/// VisGraph: bit `a * 6 + b` is set when faces `a` and `b` (Direction
/// order) are connected through non-opaque blocks.
pub visibility: u64,
@@ -290,6 +297,8 @@ impl Default for SectionMesh {
solid: Vec::new(),
sides: Sides::default(),
translucent: Vec::new(),
packed: Vec::new(),
solid_tints: Vec::new(),
visibility: ALL_VISIBLE,
block_entities: Vec::new(),
lights: Vec::new(),
@@ -322,6 +331,8 @@ impl SectionMesh {
pub fn clear(&mut self) {
self.solid.clear();
self.translucent.clear();
self.packed.clear();
self.solid_tints.clear();
self.block_entities.clear();
self.lights.clear();
self.sprite_layers.clear();
@@ -333,15 +344,27 @@ impl SectionMesh {
pub(crate) fn capacity_bytes(&self) -> usize {
self.solid.capacity() * std::mem::size_of::<TerrainVertex>()
+ self.translucent.capacity() * std::mem::size_of::<TerrainVertex>()
+ self.packed.capacity() * std::mem::size_of::<[u32; 6]>()
+ self.solid_tints.capacity() * std::mem::size_of::<u32>()
+ self.block_entities.capacity() * std::mem::size_of::<([i32; 3], u32)>()
+ self.lights.capacity() * std::mem::size_of::<([i32; 3], u32)>()
+ self.sprite_layers.capacity() * std::mem::size_of::<u16>()
}
/// Sorts the solid quads by the side they face, for the renderer to
/// leave out those facing away from the eye (`sides`).
/// Then lays them out compactly (`packed`) while the renderer reads that.
pub fn sort_solid(&mut self) {
self.sides = sides::sort(&mut self.solid);
let quads = self.solid.len() / 4;
if !self.solid_tints.is_empty() {
self.solid_tints.resize(quads, packed::UNKNOWN_TINT);
}
self.sides = sides::sort_tinted(&mut self.solid, &mut self.solid_tints);
self.bounds = self.compute_bounds();
self.packed.clear();
if packed::packing() && quads > 0 && self.solid_tints.len() == quads {
self.packed = packed::layout(&self.solid, &self.solid_tints);
}
self.solid_tints.clear();
}
/// Computes the tight axis-aligned bounding box [min, max] of actual terrain geometry vertices.
@@ -1519,12 +1542,24 @@ impl Mesher<'_> {
let other = &info[neighbor as usize];
// LeavesBlock.skipRendering with opaque leaves.
let opaque_leaves = !self.cutout_leaves && state.leaves && other.leaves;
let hollow_leaf = self.leaf_culling == LeafCullingMode::Hollow
&& state.leaves
&& other.leaves
&& leaf_culling::in_section(x + dx, y + dy, z + dz);
let culled_leaf = match self.leaf_culling {
LeafCullingMode::Hollow | LeafCullingMode::Hidden => {
state.leaves
&& other.leaves
&& leaf_culling::in_section(x + dx, y + dy, z + dz)
&& (self.leaf_culling == LeafCullingMode::Hollow
|| leaf_culling::backed(
pad,
info,
region,
base_y,
[x + 2 * dx, y + 2 * dy, z + 2 * dz],
))
}
_ => false,
};
visible[d as usize] = !opaque_leaves
&& !hollow_leaf
&& !culled_leaf
&& self
.visibility
.should_render_face(
@@ -1770,8 +1805,8 @@ impl Mesher<'_> {
TileLayer::Skip | TileLayer::Default => own,
};
match pick {
Pick::Keep => self.quad(out, solid_leaves, own, corners.map(|c| c.0)),
Pick::Tile(t) => self.quad(out, solid_leaves, tile(t), corners.map(|c| c.0)),
Pick::Keep => self.quad(out, solid_leaves, own, corners.map(|c| c.0), tint),
Pick::Tile(t) => self.quad(out, solid_leaves, tile(t), corners.map(|c| c.0), tint),
Pick::Quarters(tiles) => {
let cuts = cuts(&corners);
for s in cuts.windows(2) {
@@ -1779,7 +1814,8 @@ impl Mesher<'_> {
let piece = [(s[0], t[0]), (s[1], t[0]), (s[1], t[1]), (s[0], t[1])]
.map(|(s, t)| bilinear(&corners, s, t));
let quarter = quarter_of(&piece);
self.quad(out, solid_leaves, tile(tiles[quarter]), piece.map(|c| c.0));
let piece = piece.map(|c| c.0);
self.quad(out, solid_leaves, tile(tiles[quarter]), piece, tint);
}
}
}
@@ -1823,7 +1859,7 @@ impl Mesher<'_> {
for t in cuts.windows(2) {
let piece = [(s[0], t[0]), (s[1], t[0]), (s[1], t[1]), (s[0], t[1])]
.map(|(s, t)| bilinear(&whole, s, t).0);
self.quad_as(out, false, tile, piece, false);
self.quad_as(out, false, tile, piece, false, tint);
}
}
}
@@ -1836,8 +1872,9 @@ impl Mesher<'_> {
solid_leaves: bool,
tile: TileLayer,
v: [TerrainVertex; 4],
tint: Option<u32>,
) {
self.quad_as(out, solid_leaves, tile, v, true);
self.quad_as(out, solid_leaves, tile, v, true, tint);
}
/// Whether [`Mesher::quad`] draws `tile` in the translucent pass.
fn translucent(&self, tile: TileLayer) -> bool {
@@ -1856,7 +1893,8 @@ impl Mesher<'_> {
}
}
/// [`Mesher::quad`], with the sprite's own translucency (`translucent_layers`) counted only
/// when `by_sprite`: an overlay's pass is its rule's.
/// when `by_sprite`: an overlay's pass is its rule's. `tint`: what its grey levels were
/// multiplied by, for the compact layout (`packed`).
fn quad_as(
&self,
out: &mut SectionMesh,
@@ -1864,6 +1902,7 @@ impl Mesher<'_> {
tile: TileLayer,
mut v: [TerrainVertex; 4],
by_sprite: bool,
tint: Option<u32>,
) {
let TileLayer::Layer {
layer,
@@ -1897,6 +1936,12 @@ impl Mesher<'_> {
vertex.layer = layer;
}
target.extend(v);
if !translucent {
// Quads other code put in `solid` (lava) have no tint known.
let quad = out.solid.len() / 4 - 1;
out.solid_tints.resize(quad, packed::UNKNOWN_TINT);
out.solid_tints.push(tint.unwrap_or(packed::WHITE));
}
}
}
/// The cuts of a `ctm_compact` face, in quad parameters, without allocating: the first `.1`
@@ -12,7 +12,9 @@
//! Aggressive` runs a multi-source breadth-first search from leaves touching
//! openings, solidifying leaves with a single open face to thin the canopy shell
//! by one layer. `Hollow` directly drops faces shared between two leaves within
//! the section, preserving boundaries and cavity faces.
//! the section, preserving boundaries and cavity faces. `Hidden` drops only
//! those whose faced leaf has another leaf or an opaque cube behind it
//! ([`backed`]), so the layer seen through the canopy's outer holes stays.
use super::{B, Info, P, Padded, pi};
use crate::{blocks::RenderShape, chunk::Chunk, graphics::LeafCullingMode};
@@ -229,6 +231,21 @@ pub(super) fn in_section(x: i32, y: i32, z: i32) -> bool {
(0..16).contains(&x) && (0..16).contains(&y) && (0..16).contains(&z)
}
/// `Hidden`: whether the padded cell `[x, y, z]`, the one behind a faced leaf,
/// is a leaf or a full opaque cube. A cell without real data never is.
#[inline]
pub(super) fn backed(
pad: &Padded,
info: &[Info],
region: &[[Option<&Chunk>; 3]; 3],
base_y: i32,
[x, y, z]: [i32; 3],
) -> bool {
info.get(pad.blocks[pi(x, y, z)] as usize)
.is_some_and(|state| state.leaves || state.opaque_cube)
&& known(region, base_y, x, y, z)
}
/// Whether the padded cell `(x, y, z)` has real block data. A missing chunk
/// does not count: `Padded::fill` copies the centre's edge column into it, which
/// would make a canopy look enclosed. A Y outside the column counts as unknown
@@ -0,0 +1,343 @@
//! The compact layout of a section's solid quads in the arena: most of them are whole faces
//! of a block's cube on the block grid, and those take one 24-byte record each instead of
//! four 24-byte vertices. terrain.wgsl's `section_corner` expands a record into the very
//! vertex words `TerrainVertex` would hold (`packed_vertex` here is the same on the CPU, and
//! a record is kept only when it gives back the quad's four vertices bit for bit), so every
//! pass draws the same picture from either layout.
//!
//! A mesh's solid range is then one record per quad in mesh order (so `Sides` and the draws
//! count quads as before), padding to a multiple of 4 slots, and the quads no record fits as
//! their four vertices: their record holds the distance to those (`FULL`). A record:
//!
//! - word 0: the tint (0xRRGGBB as the mesher multiplies it) and the colour's alpha byte;
//! - word 1: each corner's grey level before the tint;
//! - word 2: the UV rectangle in 1/32 of the sprite (u0, u1, v0, v1, 6 bits each) and, per
//! corner, which edge of it its u and v take;
//! - word 3: the layer, and corner 0's light (sky and block light over 4, 6 bits each);
//! - word 4: corners 1 and 2's light;
//! - word 5: corner 3's light, the face (block x, y, z, the axis it faces along, which side
//! of the block, and where and which way its corners go round), and `FULL` clear.
use super::TerrainVertex;
use std::sync::atomic::{AtomicBool, Ordering};
/// A solid quad's tint the mesher does not know (fluids): only untinted colours pack.
pub const UNKNOWN_TINT: u32 = u32::MAX;
/// The tint of an untinted quad, whose colour is its grey level.
pub const WHITE: u32 = 0xFF_FFFF;
/// Word 5's bit of a quad kept as four vertices; word 0 is then the slots from the record
/// to its first vertex.
pub const FULL: u32 = 1 << 31;
/// The draws' base vertex of a compact mesh: `PACKED_BASE + 4 * slot + corner` is a corner of
/// the quad whose record is at `slot`; below it, vertex indices name vertices.
pub const PACKED_BASE: u32 = 1 << 28;
/// Whether meshes sorted from now on get the compact layout: set by the renderer while its
/// passes read it (no shader pack).
static PACK: AtomicBool = AtomicBool::new(false);
pub fn pack_quads(on: bool) {
PACK.store(on, Ordering::Relaxed);
}
pub fn packing() -> bool {
PACK.load(Ordering::Relaxed)
}
/// The order corners go round a face: (du, dw) of each step.
const ROUND: [[u32; 2]; 4] = [[0, 0], [1, 0], [1, 1], [0, 1]];
/// `quad`'s record, if one gives back its four vertices exactly. `tint`: what the mesher
/// multiplied its grey levels by (`UNKNOWN_TINT` when it does not say).
pub fn pack_quad(quad: &[TerrainVertex; 4], tint: u32) -> Option<[u32; 6]> {
// Corners on the block grid of the section.
let mut p = [[0u32; 3]; 4];
for (to, v) in p.iter_mut().zip(quad) {
for (c, &x) in to.iter_mut().zip(&v.pos) {
if !(0.0..=16.0).contains(&x) || x.fract() != 0.0 {
return None;
}
*c = x as u32;
}
}
let axis = (0..3).find(|&a| p.iter().all(|c| c[a] == p[0][a]))?;
let (u, w) = ((axis + 1) % 3, (axis + 2) % 3);
let lo = [u, w].map(|k| p.iter().map(|c| c[k]).min().unwrap_or(0));
if lo.iter().any(|&l| l > 15) {
return None;
}
let mut steps = [0u32; 4];
for (step, c) in steps.iter_mut().zip(&p) {
let d = [c[u] - lo[0], c[w] - lo[1]];
*step = ROUND.iter().position(|r| *r == d)? as u32;
}
let (start, dir) = (0..8u32).map(|n| (n & 3, n >> 2)).find(|&(start, dir)| {
(0..4u32).all(|i| {
let step = if dir == 1 { 4 - i } else { i };
steps[i as usize] == (start + step) & 3
})
})?;
let plane = p[0][axis];
let mut block = [0u32; 3];
block[axis] = plane.min(15);
block[u] = lo[0];
block[w] = lo[1];
let side = plane - block[axis];
let orient = block[0]
| block[1] << 4
| block[2] << 8
| (axis as u32) << 12
| side << 14
| start << 15
| dir << 17;
// UVs in 1/32 of the sprite, at most two values each way.
let mut ranges = [[u32::MAX, 0u32]; 2];
let mut uvs = [[0u32; 2]; 4];
for (uv, v) in uvs.iter_mut().zip(quad) {
for k in 0..2 {
let raw = u32::from(v.uv[k]);
if raw & 1023 != 0 {
return None;
}
uv[k] = raw >> 10;
ranges[k] = [ranges[k][0].min(uv[k]), ranges[k][1].max(uv[k])];
}
}
let mut select = 0u32;
for (i, uv) in uvs.iter().enumerate() {
for k in 0..2 {
if uv[k] == ranges[k][1] && uv[k] != ranges[k][0] {
select |= 1 << (2 * i + k);
} else if uv[k] != ranges[k][0] {
return None;
}
}
}
let rect = ranges[0][0] | ranges[0][1] << 6 | ranges[1][0] << 12 | ranges[1][1] << 18;
// Light in steps of 4 (smooth light averages four levels of 16).
let mut light = [0u32; 4];
for (l, v) in light.iter_mut().zip(quad) {
let (sky, block) = (u32::from(v.light & 0xFF), u32::from(v.light >> 8));
if sky & 3 != 0 || block & 3 != 0 {
return None;
}
*l = sky >> 2 | (block >> 2) << 6;
}
// The colour: each channel the grey level times the tint's, over 255.
let tint = if tint == UNKNOWN_TINT {
WHITE
} else {
tint & WHITE
};
let alpha = quad[0].color & 0xFF00_0000;
let mut grays = 0u32;
for (i, v) in quad.iter().enumerate() {
grays |= gray_of(v.color, tint)? << (8 * i);
}
let words = [
tint | alpha,
grays,
rect | select << 24,
u32::from(quad[0].layer) | light[0] << 16,
light[1] | light[2] << 12,
light[3] | orient << 12,
];
let exact = (0..4).all(|c| {
let (a, b) = (packed_vertex(&words, c), quad[c]);
bytemuck::bytes_of(&a) == bytemuck::bytes_of(&b)
});
exact.then_some(words)
}
/// The tint's channels, as the mesher takes them for red, green and blue.
fn channels(tint: u32) -> [u32; 3] {
[tint >> 16 & 255, tint >> 8 & 255, tint & 255]
}
/// A grey level that `tint` turns into `color`'s red, green and blue.
fn gray_of(color: u32, tint: u32) -> Option<u32> {
let want = [color & 255, color >> 8 & 255, color >> 16 & 255];
let t = channels(tint);
let gives = |g: u32| (0..3).all(|k| g * t[k] / 255 == want[k]);
let k = (0..3).max_by_key(|&k| t[k]).unwrap_or(0);
if t[k] == 0 {
return gives(0).then_some(0);
}
let lo = (want[k] * 255).div_ceil(t[k]);
let hi = ((want[k] * 255 + 254) / t[k]).min(255);
(lo..=hi).find(|&g| gives(g))
}
/// Corner `corner` of the quad `words` holds, as terrain.wgsl's `packed_corner` expands it.
pub fn packed_vertex(words: &[u32; 6], corner: usize) -> TerrainVertex {
let [w0, w1, w2, w3, w4, w5] = *words;
let orient = w5 >> 12 & 0x3_FFFF;
let block = [orient & 15, orient >> 4 & 15, orient >> 8 & 15];
let axis = (orient >> 12 & 3) as usize;
let side = orient >> 14 & 1;
let (start, dir) = (orient >> 15 & 3, orient >> 17 & 1);
let i = corner as u32;
let step = (start + if dir == 1 { 4 - i } else { i }) & 3;
let [du, dw] = ROUND[step as usize];
let mut pos = block;
pos[axis] += side;
pos[(axis + 1) % 3] += du;
pos[(axis + 2) % 3] += dw;
let select = w2 >> 24;
let us = select >> (2 * i) & 1;
let vs = select >> (2 * i + 1) & 1;
let uv = [w2 >> (6 * us) & 63, w2 >> (12 + 6 * vs) & 63].map(|k| (k << 10) as u16);
let light = [w3 >> 16, w4, w4 >> 12, w5][corner] & 0xFFF;
let light = ((light & 63) << 2 | (light >> 6 & 63) << 10) as u16;
let g = w1 >> (8 * i) & 255;
let [r, gr, b] = channels(w0).map(|t| g * t / 255);
TerrainVertex {
pos: pos.map(|c| c as f32),
uv,
layer: (w3 & 0xFFFF) as u16,
light,
color: r | gr << 8 | b << 16 | (w0 & 0xFF00_0000),
}
}
/// The compact layout of sorted solid quads with their tints (`SectionMesh::packed`), or
/// nothing when it would be no smaller than their vertices.
pub fn layout(solid: &[TerrainVertex], tints: &[u32]) -> Vec<[u32; 6]> {
let quads = solid.as_chunks::<4>().0;
let records: Vec<Option<[u32; 6]>> = quads
.iter()
.zip(tints)
.map(|(q, &t)| pack_quad(q, t))
.collect();
let n = quads.len();
let packed = records.iter().filter(|r| r.is_some()).count();
let full = n - packed;
let pad = if full > 0 {
n.next_multiple_of(4) - n
} else {
0
};
if n + pad + 4 * full >= 4 * n {
return Vec::new();
}
let mut out = Vec::with_capacity(n + pad + 4 * full);
let mut next = n + pad;
for (i, record) in records.iter().enumerate() {
out.push(record.unwrap_or_else(|| {
let at = next;
next += 4;
[(at - i) as u32, 0, 0, 0, 0, FULL]
}));
}
out.resize(n + pad, [0; 6]);
for (q, record) in quads.iter().zip(&records) {
if record.is_none() {
out.extend(
q.iter()
.map(|v| bytemuck::cast::<TerrainVertex, [u32; 6]>(*v)),
);
}
}
out
}
/// Quads `layout` gave a record of their own.
pub fn packed_quads(layout: &[[u32; 6]], quads: usize) -> usize {
layout
.iter()
.take(quads)
.filter(|w| w[5] & FULL == 0)
.count()
}
#[cfg(test)]
mod tests {
use super::*;
const TINT: u32 = 0x7F_B238;
/// An opaque colour the mesher makes of grey level `g` times `tint`.
fn tinted(g: u32, tint: u32) -> u32 {
let [r, gr, b] = channels(tint).map(|t| g * t / 255);
r | gr << 8 | b << 16 | 0xFF00_0000
}
/// The top face of block (3, 15, 5), corners in `order`: tinted, smooth lit, with
/// ambient occlusion darkening its corners differently.
fn top(order: [usize; 4]) -> [TerrainVertex; 4] {
let pos = [
[3.0, 16.0, 5.0],
[3.0, 16.0, 6.0],
[4.0, 16.0, 6.0],
[4.0, 16.0, 5.0],
];
let uv = [[0, 0], [16 << 10, 0], [16 << 10, 16 << 10], [0, 16 << 10]];
let grays = [200, 180, 160, 200];
order.map(|i| TerrainVertex {
pos: pos[i],
uv: uv[i],
layer: 7,
light: 0xF0 | 0x40 << 8,
color: tinted(grays[i], TINT),
})
}
fn same(a: &TerrainVertex, b: &TerrainVertex) -> bool {
bytemuck::bytes_of(a) == bytemuck::bytes_of(b)
}
#[test]
fn a_whole_cube_face_takes_one_record_either_way_round() {
for order in [[0, 1, 2, 3], [2, 3, 0, 1], [0, 3, 2, 1]] {
let quad = top(order);
let words = pack_quad(&quad, TINT).expect("a whole face on the block grid packs");
for (corner, v) in quad.iter().enumerate() {
assert!(
same(&packed_vertex(&words, corner), v),
"{order:?} corner {corner}"
);
}
}
}
#[test]
fn quads_off_the_grid_or_the_steps_keep_their_vertices() {
// Half a block up: a slab's top.
let mut slab = top([0, 1, 2, 3]);
for v in &mut slab {
v.pos[1] = 8.5;
}
assert!(pack_quad(&slab, TINT).is_none());
// A UV between the 1/32 steps.
let mut uv = top([0, 1, 2, 3]);
uv[2].uv[0] += 1;
assert!(pack_quad(&uv, TINT).is_none());
// Light between the steps of 4.
let mut light = top([0, 1, 2, 3]);
light[1].light += 1;
assert!(pack_quad(&light, TINT).is_none());
}
#[test]
fn a_quad_without_a_record_points_at_its_own_vertices() {
let mut odd = top([0, 1, 2, 3]);
for v in &mut odd {
v.pos[1] = 8.5;
}
let mut solid: Vec<TerrainVertex> = Vec::new();
for _ in 0..4 {
solid.extend(top([0, 1, 2, 3]));
}
solid.extend(odd);
let out = layout(&solid, &[TINT; 5]);
// Five records, padded to eight slots, then the odd quad's four vertices.
assert_eq!(out.len(), 12);
assert_eq!(packed_quads(&out, 5), 4);
assert_eq!(out[4][5], FULL);
let at = 4 + out[4][0] as usize;
for (slot, v) in out[at..at + 4].iter().zip(&odd) {
assert!(same(&bytemuck::cast::<[u32; 6], TerrainVertex>(*slot), v));
}
// Nothing smaller to gain: no layout at all.
assert!(layout(&odd, &[TINT]).is_empty());
}
}
@@ -74,7 +74,7 @@ fn slot(grouped: bool, n: usize) -> (usize, bool) {
/// Where each part of each bucket of a mesh's solid quads ends, and the
/// planes that tell whether a bucket can face the eye.
#[derive(Clone, Copy, Debug, Default, PartialEq)]
#[derive(Clone, Copy, Debug, Default, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct Sides {
/// The solid quads up to the end of each part of each bucket, in mesh
/// order (`slot`).
@@ -205,13 +205,21 @@ fn bucket(quad: &[TerrainVertex; 4]) -> usize {
/// cutout quads are also ordered front to back within each axis-facing
/// bucket; quads that tie keep the mesher's order (the quad's index ends its
/// sort key), so coplanar overlays still draw over their base.
pub fn sort(solid: &mut Vec<TerrainVertex>) -> Sides {
sort_parts(solid, GROUPED.load(Ordering::Relaxed))
#[cfg(test)]
fn sort(solid: &mut Vec<TerrainVertex>) -> Sides {
sort_tinted(solid, &mut Vec::new())
}
/// `sort`, moving each quad's tint in `tints` (one per quad, or none) with it.
pub fn sort_tinted(solid: &mut Vec<TerrainVertex>, tints: &mut Vec<u32>) -> Sides {
let grouped = GROUPED.load(Ordering::Relaxed);
SORT_SCRATCH.with_borrow_mut(|scratch| sort_with(solid, tints, grouped, scratch))
}
/// `sort`, with all the opaque parts first when `grouped`.
#[cfg(test)]
fn sort_parts(solid: &mut Vec<TerrainVertex>, grouped: bool) -> Sides {
SORT_SCRATCH.with_borrow_mut(|scratch| sort_with(solid, grouped, scratch))
SORT_SCRATCH.with_borrow_mut(|scratch| sort_with(solid, &mut Vec::new(), grouped, scratch))
}
/// `sort`'s buffers, kept by each meshing thread so sorting a mesh allocates
@@ -222,6 +230,7 @@ struct SortScratch {
slots: Vec<u8>,
keys: Vec<u64>,
sorted: Vec<[TerrainVertex; 4]>,
tints: Vec<u32>,
}
thread_local! {
static SORT_SCRATCH: std::cell::RefCell<SortScratch> = Default::default();
@@ -233,9 +242,15 @@ fn total_order_key(v: f32) -> u32 {
(bits ^ (((bits >> 31) as u32) >> 1) as i32) as u32 ^ 0x8000_0000
}
fn sort_with(solid: &mut Vec<TerrainVertex>, grouped: bool, scratch: &mut SortScratch) -> Sides {
fn sort_with(
solid: &mut Vec<TerrainVertex>,
tints: &mut Vec<u32>,
grouped: bool,
scratch: &mut SortScratch,
) -> Sides {
let (quads, rest) = solid.as_chunks::<4>();
debug_assert!(rest.is_empty(), "solid vertices come in quads");
let quads_len = quads.len();
let cutout = |q: &[TerrainVertex; 4]| q[0].layer & OPAQUE_LAYER == 0;
// Each quad's part, by its place in mesh order (`slot`).
let position = |b: usize, cutout: bool| match grouped {
@@ -297,6 +312,12 @@ fn sort_with(solid: &mut Vec<TerrainVertex>, grouped: bool, scratch: &mut SortSc
sorted.extend(keys.iter().map(|&k| quads[(k & 0xFF_FFFF) as usize]));
solid.clear();
solid.extend_from_slice(sorted.as_flattened());
if tints.len() == quads_len {
let sorted_tints = &mut scratch.tints;
sorted_tints.clear();
sorted_tints.extend(keys.iter().map(|&k| tints[(k & 0xFF_FFFF) as usize]));
std::mem::swap(tints, sorted_tints);
}
}
Sides {
ends: slot_ends,
+8 -3
View File
@@ -99,9 +99,14 @@ pub(crate) fn prepare_with_models(
.filter(|name| registry.default_state(name).is_some())
.map(|name| name.strip_prefix("minecraft:").unwrap_or(name))
.collect();
let mut catalog =
StateModels::from_facts_with_models(root, registry, &blocks, sprites, &facts, models)?;
catalog.bake_standalone(root, sprites, models, standalone())?;
let mut catalog = {
let _step = crate::spans::startup::step("core.bake_states");
StateModels::from_facts_with_models(root, registry, &blocks, sprites, &facts, models)?
};
{
let _step = crate::spans::startup::step("core.bake_standalone");
catalog.bake_standalone(root, sprites, models, standalone())?;
}
let mut placements = Vec::new();
let mut states = Vec::new();
for (index, (name, properties)) in GALLERY.iter().enumerate() {
@@ -6,7 +6,7 @@
// the depth bounds stage, which sees the unfaded alpha.
fn oit_cloud_color(in: Out, front: bool, fade: bool) -> vec4<f32> {
let color = textureSample(atlas, atlas_sampler, in.uv) * select(in.back_color, in.color, front);
let faded = 1.0 - linear_fog(in.spherical, 0.0, globals.fog_ends.y);
let faded = 1.0 - linear_fog(in.fog_distance.x, 0.0, globals.fog_ends.y);
return vec4(color.rgb, color.a * select(1.0, faded, fade));
}
@fragment fn fs_oit_cloud_bounds(in: Out, @builtin(front_facing) front: bool) -> @location(0) vec4<f32> {
+301 -23
View File
@@ -19,6 +19,7 @@ use horizon_core::{
};
use horizon_world::block_collision::BlockCollisionRegistry;
use std::{
array,
collections::{HashMap, HashSet},
path::Path,
};
@@ -527,7 +528,7 @@ pub fn breaking_position(
}
}
// Vanilla consumes all three doubles before replacing the hit-face coordinate.
let mut p = std::array::from_fn(|i| {
let mut p = array::from_fn(|i| {
f64::from(pos[i])
+ random.next_double() * (bounds[i + 3] - bounds[i] - f64::from(0.2f32))
+ f64::from(0.1f32)
@@ -659,18 +660,16 @@ pub fn destroy_positions(
mut emit: impl FnMut([f64; 3], [f64; 3]),
) {
for b in boxes {
let widths: [f64; 3] = std::array::from_fn(|i| (b[i + 3] - b[i]).min(1.0));
let widths: [f64; 3] = array::from_fn(|i| (b[i + 3] - b[i]).min(1.0));
let counts: [usize; 3] = widths.map(|w| ((w / 0.25).ceil() as usize).max(2));
for x in 0..counts[0] {
for y in 0..counts[1] {
for z in 0..counts[2] {
let cells = [x, y, z];
let relative: [f64; 3] =
std::array::from_fn(|i| (cells[i] as f64 + 0.5) / counts[i] as f64);
array::from_fn(|i| (cells[i] as f64 + 0.5) / counts[i] as f64);
emit(
std::array::from_fn(|i| {
f64::from(pos[i]) + (relative[i] * widths[i] + b[i])
}),
array::from_fn(|i| f64::from(pos[i]) + (relative[i] * widths[i] + b[i])),
relative.map(|v| v - 0.5),
);
}
@@ -751,7 +750,7 @@ pub fn on_block_faces_between(
let count = random.next_int_bound(max - min + 1).unwrap_or(0) + min;
for _ in 0..count {
// getRandomSpeedRanges, then spawnParticleOnFace with step factor 0.55.
let speed: [f64; 3] = std::array::from_fn(|_| next_double_between(random, -0.5, 0.5));
let speed: [f64; 3] = array::from_fn(|_| next_double_between(random, -0.5, 0.5));
let mut p = [0.0; 3];
let mut v = [0.0; 3];
for i in 0..3 {
@@ -780,12 +779,12 @@ pub fn along_axis(
) {
let count = random.next_int_bound(max - min + 1).unwrap_or(0) + min;
for _ in 0..count {
let p: [f64; 3] = std::array::from_fn(|i| {
let p: [f64; 3] = array::from_fn(|i| {
f64::from(pos[i])
+ 0.5
+ next_double_between(random, -1.0, 1.0) * if i == axis { 0.5 } else { 0.125 }
});
let v: [f64; 3] = std::array::from_fn(|i| {
let v: [f64; 3] = array::from_fn(|i| {
if i == axis {
next_double_between(random, -1.0, 1.0)
} else {
@@ -1268,6 +1267,113 @@ impl ParticleLightCache {
}
}
const PARTICLE_SECTION_CACHE_SIZE: usize = 128;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
enum SectionFrustumResult {
Outside,
Intersects,
Inside,
}
#[derive(Clone, Copy)]
struct CachedSectionFrustum {
section: [i32; 3],
radius_quarters: i32,
result: SectionFrustumResult,
}
struct ParticleSectionFrustumCache {
entries: [Option<CachedSectionFrustum>; PARTICLE_SECTION_CACHE_SIZE],
}
impl Default for ParticleSectionFrustumCache {
fn default() -> Self {
Self {
entries: [None; PARTICLE_SECTION_CACHE_SIZE],
}
}
}
impl ParticleSectionFrustumCache {
fn result(
&mut self,
world: [f64; 3],
camera: DVec3,
radius: f64,
frustum: &crate::gfx::Frustum,
) -> SectionFrustumResult {
let Some(section) = world_section(world) else {
return SectionFrustumResult::Intersects;
};
if !radius.is_finite() || radius < 0.0 || radius * 4.0 > f64::from(i32::MAX) {
return SectionFrustumResult::Intersects;
}
let radius_quarters = (radius * 4.0).ceil() as i32;
let hash = (section[0] as u32).wrapping_mul(73_856_093)
^ (section[1] as u32).wrapping_mul(19_349_663)
^ (section[2] as u32).wrapping_mul(83_492_791)
^ (radius_quarters as u32).wrapping_mul(2_654_435_761);
let slot = hash as usize & (PARTICLE_SECTION_CACHE_SIZE - 1);
if let Some(entry) = self.entries[slot]
&& entry.section == section
&& entry.radius_quarters == radius_quarters
{
return entry.result;
}
let pad = f64::from(radius_quarters) * 0.25;
let camera = camera.to_array();
let min = array::from_fn(|axis| f64::from(section[axis]) * 16.0 - pad - camera[axis]);
let max = array::from_fn(|axis| min[axis] + 16.0 + 2.0 * pad);
let result = if min.into_iter().chain(max).any(|v| !v.is_finite()) {
SectionFrustumResult::Intersects
} else {
let min = FVec3::from_array(min.map(|v| v as f32));
let max = FVec3::from_array(max.map(|v| v as f32));
if !min.is_finite() || !max.is_finite() {
SectionFrustumResult::Intersects
} else if frustum.contains(min, max) {
SectionFrustumResult::Inside
} else if frustum.intersects(min, max) {
SectionFrustumResult::Intersects
} else {
SectionFrustumResult::Outside
}
};
self.entries[slot] = Some(CachedSectionFrustum {
section,
radius_quarters,
result,
});
result
}
}
fn world_section(position: [f64; 3]) -> Option<[i32; 3]> {
let mut block = [0; 3];
for axis in 0..3 {
let value = position[axis].floor();
if !value.is_finite() || value < f64::from(i32::MIN) || value > f64::from(i32::MAX) {
return None;
}
block[axis] = value as i32;
}
Some([block[0] >> 4, block[1] >> 4, block[2] >> 4])
}
fn below_half_pixel(radius: f64, distance_squared: f64, pixel_focal_length: f32) -> bool {
let projected_limit = 4.0 * radius * f64::from(pixel_focal_length);
radius.is_finite()
&& radius >= 0.0
&& distance_squared.is_finite()
&& distance_squared > 0.0
&& pixel_focal_length.is_finite()
&& pixel_focal_length > 0.0
&& projected_limit.is_finite()
&& projected_limit * projected_limit < distance_squared
}
/// `ClientExplosionTracker.ExplosionInfo`.
#[derive(Clone, Copy, Debug)]
struct TrackedExplosion {
@@ -1551,7 +1657,7 @@ impl ParticleEngine {
for _ in 0..128 {
let r = &mut self.level_random;
let t = r.next_double();
let velocity = std::array::from_fn(|_| f64::from((r.next_float() - 0.5) * 0.2));
let velocity = array::from_fn(|_| f64::from((r.next_float() - 0.5) * 0.2));
let position = [
to[0] + t * (from[0] - to[0]) + (r.next_double() - 0.5) + 0.5,
to[1] + t * (from[1] - to[1]) + r.next_double() - 0.5,
@@ -1579,7 +1685,7 @@ impl ParticleEngine {
for _ in 0..128 {
let r = &mut self.level_random;
let t = r.next_double();
let velocity = std::array::from_fn(|_| f64::from((r.next_float() - 0.5) * 0.2));
let velocity = array::from_fn(|_| f64::from((r.next_float() - 0.5) * 0.2));
// Mth.lerp(t, to, from).
let position = [
to[0] + t * (from[0] - to[0]) + (r.next_double() - 0.5) * WIDTH * 2.0,
@@ -4391,8 +4497,7 @@ impl ParticleEngine {
.filter(|p| p.rgba[3] > 0.0)
.filter_map(|p| {
let (_, rgb, reach) = shining.iter().find(|(ty, ..)| *ty == p.ty)?;
let at =
std::array::from_fn(|i| p.previous[i] + (p.position[i] - p.previous[i]) * f);
let at = array::from_fn(|i| p.previous[i] + (p.position[i] - p.previous[i]) * f);
Some((at, *rgb, *reach, p.rgba[3].clamp(0.0, 1.0)))
})
.collect()
@@ -4407,11 +4512,70 @@ impl ParticleEngine {
partial: f32,
light_at: &dyn Fn([i32; 3]) -> u8,
out: &mut Vec<Vertex>,
) {
self.render_inner::<false>(
camera,
yaw,
pitch,
partial,
0.0,
None,
&mut |_, _| false,
light_at,
out,
);
}
/// Render particles after rejecting view-frustum misses and any particles
/// the caller proves hidden behind opaque terrain.
pub fn render_culled(
&self,
camera: DVec3,
yaw: f32,
pitch: f32,
partial: f32,
pixel_focal_length: f32,
culling_enabled: bool,
frustum: Option<&crate::gfx::Frustum>,
mut occluded: impl FnMut([f64; 3], [f64; 3]) -> bool,
light_at: &dyn Fn([i32; 3]) -> u8,
out: &mut Vec<Vertex>,
) {
if !culling_enabled {
self.render(camera, yaw, pitch, partial, light_at, out);
return;
}
self.render_inner::<true>(
camera,
yaw,
pitch,
partial,
pixel_focal_length,
frustum,
&mut occluded,
light_at,
out,
);
}
fn render_inner<const CULL: bool>(
&self,
camera: DVec3,
yaw: f32,
pitch: f32,
partial: f32,
pixel_focal_length: f32,
frustum: Option<&crate::gfx::Frustum>,
occluded: &mut dyn FnMut([f64; 3], [f64; 3]) -> bool,
light_at: &dyn Fn([i32; 3]) -> u8,
out: &mut Vec<Vertex>,
) {
// Camera.setRotation: rotationYXZ(PI - yRot, -xRot, 0).
let base = Quat::from_rotation_y(std::f32::consts::PI - yaw.to_radians())
* Quat::from_rotation_x(-pitch.to_radians());
let mut light_cache = ParticleLightCache::default();
let mut section_cache =
(CULL && frustum.is_some()).then(ParticleSectionFrustumCache::default);
for p in &self.particles {
if p.no_render {
continue;
@@ -4423,6 +4587,39 @@ impl ParticleEngine {
{
continue;
}
if CULL && matches!(p.behaviour, Behaviour::Shriek { delay } if delay > 0) {
continue;
}
let culled_geometry = if CULL {
let a = f64::from(partial);
let world = array::from_fn(|i| p.previous[i] + (p.position[i] - p.previous[i]) * a);
let center = (DVec3::from_array(world) - camera).as_vec3();
let size = p.quad_size(partial);
// Every generated quad vertex is sqrt(2) * size from its center,
// including the rotated two-quad particle types.
let radius = f64::from(size.abs()) * std::f64::consts::SQRT_2 + 0.05;
if let (Some(frustum), Some(section_cache)) = (frustum, section_cache.as_mut()) {
match section_cache.result(world, camera, radius, frustum) {
SectionFrustumResult::Outside => continue,
SectionFrustumResult::Intersects
if !frustum.intersects_sphere(center, radius as f32) =>
{
continue;
}
SectionFrustumResult::Inside | SectionFrustumResult::Intersects => {}
}
}
let distance_squared = f64::from(center.length_squared());
if below_half_pixel(radius, distance_squared, pixel_focal_length) {
continue;
}
if occluded(world.map(|v| v - radius), world.map(|v| v + radius)) {
continue;
}
Some((center, size))
} else {
None
};
// `SubmitNodeCollection.submitQuadParticleGroup`: the translucent
// layer draws after translucent terrain, so a crumb of stained
// glass cannot hide the glass behind it (`getLayer`).
@@ -4438,19 +4635,20 @@ impl ParticleEngine {
},
};
let Some(r) = rect else { continue };
let a = f64::from(partial);
let pos = DVec3::new(
p.previous[0] + (p.position[0] - p.previous[0]) * a,
p.previous[1] + (p.position[1] - p.previous[1]) * a,
p.previous[2] + (p.position[2] - p.previous[2]) * a,
) - camera;
let center = pos.as_vec3();
let (center, size) = culled_geometry.unwrap_or_else(|| {
let a = f64::from(partial);
let pos = DVec3::new(
p.previous[0] + (p.position[0] - p.previous[0]) * a,
p.previous[1] + (p.position[1] - p.previous[1]) * a,
p.previous[2] + (p.position[2] - p.previous[2]) * a,
) - camera;
(pos.as_vec3(), p.quad_size(partial))
});
let rotation = if p.roll != 0.0 {
base * Quat::from_rotation_z(p.o_roll + (p.roll - p.o_roll) * partial)
} else {
base
};
let size = p.quad_size(partial);
let mut alpha = p.rgba[3];
// OverlayParticle.extract: the flash fades as it pulses.
if p.ty == ParticleType::Flash {
@@ -4464,7 +4662,7 @@ impl ParticleEngine {
match p.behaviour {
// ShriekParticle.extract: two tilted quads, fading out.
Behaviour::Shriek { delay } => {
if delay > 0 {
if !CULL && delay > 0 {
continue;
}
alpha = 1.0 - ((p.age as f32 + partial) / p.lifetime as f32).clamp(0.0, 1.0);
@@ -4507,7 +4705,7 @@ impl ParticleEngine {
// DustColorTransitionParticle.lerpColors.
Behaviour::Transition { from, to } => {
let t = (p.age as f32 + partial) / (p.lifetime as f32 + 1.0);
rgb = std::array::from_fn(|i| from[i] + (to[i] - from[i]) * t);
rgb = array::from_fn(|i| from[i] + (to[i] - from[i]) * t);
}
_ => {}
}
@@ -4642,6 +4840,86 @@ mod tests {
assert_eq!(reads.get(), 3);
}
#[test]
fn subpixel_culling_uses_the_frame_projection_and_fails_open() {
assert!(below_half_pixel(0.01, 41.0_f64.powi(2), 1_000.0));
assert!(!below_half_pixel(0.01, 40.0_f64.powi(2), 1_000.0));
assert!(!below_half_pixel(0.01, 41.0_f64.powi(2), 0.0));
assert!(!below_half_pixel(0.01, f64::NAN, 1_000.0));
assert!(!below_half_pixel(f64::NAN, 41.0_f64.powi(2), 1_000.0));
for distance in [0.25_f32, 1.0, 8.0, 40.0, 128.0] {
for radius in [0.01, 0.05, 0.2] {
let center = FVec3::new(distance, distance * 0.3, -distance * 0.8);
let old = 2.0 * radius * 900.0 / f64::from(center.length()) < 0.5;
assert_eq!(
below_half_pixel(radius, f64::from(center.length_squared()), 900.0),
old
);
}
}
}
#[test]
fn disabled_culled_render_matches_the_regular_particle_path() {
let mut engine = ParticleEngine::new(Path::new(""), &HashMap::new(), &HashSet::new());
let sprite = "test:smoke".to_owned();
engine.atlas.insert(
sprite.clone(),
(
Rect {
u0: 0.0,
v0: 0.0,
u1: 1.0,
v1: 1.0,
w: 16,
h: 16,
},
false,
),
);
let mut random = LegacyRandom::new(7);
let mut particle =
Particle::moving(&mut random, ParticleType::Smoke, [0.0, 0.0, -3.0], [0.0; 3]);
particle.sprite = Sprite::Named(sprite);
engine.particles.push(particle);
let light_at = |_: [i32; 3]| 0xf0;
let mut regular = Vec::new();
engine.render(DVec3::ZERO, 0.0, 0.0, 0.5, &light_at, &mut regular);
let mut disabled = Vec::new();
engine.render_culled(
DVec3::ZERO,
0.0,
0.0,
0.5,
900.0,
false,
None,
|_, _| panic!("disabled culling must not query particle visibility"),
&light_at,
&mut disabled,
);
let attributes = |vertices: &[Vertex]| {
vertices
.iter()
.map(|vertex| {
(
vertex.pos,
vertex.uv,
vertex.layer,
vertex.color,
vertex.light,
vertex.normal,
vertex.glint_uv,
)
})
.collect::<Vec<_>>()
};
assert_eq!(attributes(&disabled), attributes(&regular));
}
#[test]
fn a_mod_particles_json_becomes_its_sprite_set() {
let dir =
+73
View File
@@ -18,8 +18,15 @@ thread_local! {
static HERE: Cell<bool> = const { Cell::new(false) };
/// How many timed spans the thread is inside: the next span's [`Span::depth`].
static DEPTH: Cell<u8> = const { Cell::new(0) };
/// What this thread's slowest steps were busy with since it last took them ([`note`]).
static NOTES: RefCell<Vec<(f32, String)>> = const { RefCell::new(Vec::new()) };
}
/// The shortest step a [`note`] keeps, in milliseconds.
pub const NOTE_MS: f32 = 10.0;
/// The notes a thread keeps between two [`take_notes`]: its slowest steps.
const NOTES_KEPT: usize = 3;
/// A named timing: wall milliseconds and the thread's CPU milliseconds in it.
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct Span {
@@ -83,6 +90,36 @@ pub fn time<T>(name: &'static str, f: impl FnOnce() -> T) -> T {
});
out
}
/// Notes that one step inside a span took `ms` milliseconds doing `what` (one player's
/// packets, say), when this thread records spans and the step took at least [`NOTE_MS`]: a
/// span says where a slow tick went, its notes whose doing it was. Only the slowest few are
/// kept, and `what` is built only for a step that is.
pub fn note(ms: f32, what: impl FnOnce() -> String) {
if ms < NOTE_MS || !recording_here() {
return;
}
NOTES.with(|n| {
let mut n = n.borrow_mut();
if n.len() >= NOTES_KEPT {
let Some((i, _)) = n
.iter()
.enumerate()
.filter(|(_, (kept, _))| *kept < ms)
.min_by(|a, b| a.1.0.total_cmp(&b.1.0))
else {
return;
};
n.swap_remove(i);
}
n.push((ms, what()));
});
}
/// This thread's notes ([`note`]), slowest first; clears them.
pub fn take_notes() -> Vec<(f32, String)> {
let mut notes = NOTES.with(|n| std::mem::take(&mut *n.borrow_mut()));
notes.sort_by(|a, b| b.0.total_cmp(&a.0));
notes
}
/// Consecutive steps of one function timed as spans: each [`Laps::lap`] records the time since
/// the previous one (or since [`laps`]) under its name. Nothing is read while spans are off.
pub struct Laps(Option<(Instant, Option<Duration>)>);
@@ -404,6 +441,41 @@ pub mod startup {
#[cfg(test)]
mod tests {
use super::Span;
use std::sync::{Mutex, MutexGuard};
/// Spans on for every thread ([`super::enable`]) is process-wide: a test that turns them on
/// would make another, run beside it, record what it expects left out. Those tests take
/// this lock.
fn spans_switch() -> MutexGuard<'static, ()> {
static SWITCH: Mutex<()> = Mutex::new(());
SWITCH.lock().unwrap_or_else(|e| e.into_inner())
}
/// A slow tick's notes are its slowest steps, slowest first; short steps and steps on a
/// thread that records no spans leave none.
#[test]
fn notes_keep_the_slowest_steps() {
let _switch = spans_switch();
super::record_here(false);
super::note(500.0, || "unrecorded".into());
assert!(super::take_notes().is_empty());
super::record_here(true);
for (ms, what) in [
(12.0, "a"),
(900.0, "b"),
(3.0, "short"),
(40.0, "c"),
(11.0, "d"),
(60.0, "e"),
] {
super::note(ms, || what.into());
}
let notes: Vec<(f32, String)> = super::take_notes();
super::record_here(false);
let names: Vec<&str> = notes.iter().map(|(_, w)| w.as_str()).collect();
assert_eq!(names, ["b", "e", "c"]);
assert!(super::take_notes().is_empty(), "taking them clears them");
}
/// Spans of one name add up; a span the thread spent mostly waiting
/// shows its CPU time after the wall time, short ones are left out.
@@ -515,6 +587,7 @@ mod tests {
/// Laps record the steps between them while spans are on, and nothing while off.
#[test]
fn laps_time_consecutive_steps() {
let _switch = spans_switch();
let _ = super::take();
let mut off = super::laps();
off.lap("unseen");
+202 -29
View File
@@ -32,13 +32,14 @@ struct Globals {
// triangle's volume with the camera; then each rim vertex's normal against the apex.
sunrise_fan: array<vec4<f32>, 32>,
// x: Options.textureFiltering (0 none, 1 RGSS, 2 anisotropic), y: the sprite arrays' width
// in texels (vanilla's TextureSize).
// in texels (vanilla's TextureSize), z: the mip level at which a sprite is one texel when
// the views reach it, else 0 (`rotated_grid`).
filtering: vec4<f32>,
// HDR output's tier windows (hdr.rs `Hdr::windows`): x..w low to very bright,
// [0] where the lift starts, [1] where it is full.
hdr_windows: array<vec4<f32>, 2>,
// HDR lighting: x how strongly the sky lights the world now (`Sky::sky_light_factor`),
// y what the sky and fog get: the same, but none under water.
// y what the sky and fog get: the same, but none under water; z 1 with HDR output on.
hdr_light: vec4<f32>,
}
@group(0) @binding(0) var<uniform> globals: Globals;
@@ -124,12 +125,34 @@ fn sample_rgss(uv: vec2<f32>, layer: u32, pixel: vec2<f32>, du: vec2<f32>, dv: v
let max_texel = max(texel_screen.x, texel_screen.y);
let min_pixel = min(pixel.x, pixel.y);
let blend = smoothstep(min_pixel, min_pixel * 2.0, max_texel);
// Only the side of the mix that has weight is sampled: near texels (blend 0) take
// sample_nearest's one tap alone, far ones (blend 1) the rotated grid alone.
if blend <= 0.0 {
return sample_nearest(uv, layer, pixel, du, dv, texel_screen, tiled);
}
let rgss = rotated_grid(uv, layer, pixel, du, dv);
if blend >= 1.0 {
return rgss;
}
return mix(sample_nearest(uv, layer, pixel, du, dv, texel_screen, tiled), rgss, blend);
}
fn rotated_grid(uv: vec2<f32>, layer: u32, pixel: vec2<f32>, du: vec2<f32>,
dv: vec2<f32>) -> vec4<f32> {
let min_pixel = min(pixel.x, pixel.y);
let du_len = length(du);
let dv_len = length(dv);
let effective = sqrt(min(du_len, dv_len) * max(du_len, dv_len));
let exact = max(0.0, log2(effective / min_pixel));
let low = floor(exact);
let mip_blend = fract(exact);
// From this level on the sprite is a single texel (0: the views stop before one is), and
// the sampler clamps any level past it to it: there every tap reads the same value, so
// one tap gives the four's mean. Distant tiles sit there.
let single = globals.filtering.z;
if single > 0.0 && low >= single {
return sprite_level(uv, layer, low);
}
let high_single = single > 0.0 && low + 1.0 >= single;
var offsets = array<vec2<f32>, 4>(
vec2(0.125, 0.375), vec2(-0.125, -0.375), vec2(0.375, -0.125), vec2(-0.375, 0.125));
var sum_low = vec4(0.0);
@@ -137,10 +160,14 @@ fn sample_rgss(uv: vec2<f32>, layer: u32, pixel: vec2<f32>, du: vec2<f32>, dv: v
for (var i = 0; i < 4; i++) {
let p = uv + offsets[i] * pixel;
sum_low += sprite_level(p, layer, low);
sum_high += sprite_level(p, layer, low + 1.0);
if !high_single {
sum_high += sprite_level(p, layer, low + 1.0);
}
}
let rgss = mix(sum_low * 0.25, sum_high * 0.25, mip_blend);
return mix(sample_nearest(uv, layer, pixel, du, dv, texel_screen, tiled), rgss, blend);
if high_single {
sum_high = 4.0 * sprite_level(uv, layer, low + 1.0);
}
return mix(sum_low * 0.25, sum_high * 0.25, mip_blend);
}
// Distant terrain tiles (lod/mesh.rs) count their UVs in blocks past 1: each block takes the
// sprite again, as separate faces would under the clamped sampler. Sprite UVs in [0, 1] stay.
@@ -148,10 +175,13 @@ fn tile_uv(uv: vec2<f32>) -> vec2<f32> {
return uv - max(ceil(uv) - 1.0, vec2(0.0));
}
fn sprite(tiled: vec2<f32>, layer: u32) -> vec4<f32> {
// terrain.fsh's two sampling paths: sampleRGSS for RGSS, sampleNearest otherwise.
// The gradients come from the unwrapped UV, so the mip level holds across block seams.
let du = dpdx(tiled);
let dv = dpdy(tiled);
return sprite_at(tiled, layer, dpdx(tiled), dpdy(tiled));
}
// `sprite` with the unwrapped UV's screen gradients given: the visibility buffer's resolve
// (visbuffer.wgsl) works them out from the quad, as its neighbours may be other quads.
fn sprite_at(tiled: vec2<f32>, layer: u32, du: vec2<f32>, dv: vec2<f32>) -> vec4<f32> {
// terrain.fsh's two sampling paths: sampleRGSS for RGSS, sampleNearest otherwise.
let uv = tile_uv(tiled);
// The wrap shifts a face's UVs by whole blocks, so half of one tells a tile's face from a
// block's (whose UVs stay inside its sprite).
@@ -320,8 +350,10 @@ fn fade_code(w: f32) -> u32 {
// (`mesher::Part`): first the quads with no cutout that are not fading, through
// `fs_opaque`, which never discards, so a tiled GPU (Apple's) keeps hiding the pixels
// behind them; then the rest through `fs_solid`. One discard anywhere in a pipeline's shader turned that hiding off for
// all the terrain it drew. A quad the pass leaves out is decided before any of the
// vertex's work and lies outside the clip volume: it makes no pixel.
// all the terrain it drew. The draw lists give each pass only its own part; a mesh that
// was not sorted (`Sides::unsorted`) gives both passes all of its quads, so each pass
// still leaves out the other's: decided before any of the vertex's work, outside the
// clip volume, it makes no pixel.
fn opaque_quad(layer: u32, w: f32) -> bool {
return (layer & 0x8000u) != 0u && fade_code(w) == 0u;
}
@@ -366,6 +398,134 @@ fn left_out() -> TerrainOut {
return terrain_vertex(position, terrain_uv(uv, origin.w), layer, color, light, origin.xyz,
origin.w);
}
// Solid section draws that read their vertices from the arena page (gfx.rs's `pulled`
// pipelines; `mesher/packed.rs`): a draw's vertex indices below PACKED_BASE name vertices
// (`TerrainVertex`, six words, as `TERRAIN_ATTRIBUTES` reads them), from PACKED_BASE on a
// corner of the quad whose record is at that slot (`PACKED_BASE + 4 * slot + corner`).
// Either way they come out as the six words of the vertex, so the work after is the same.
// Binding 19: visbuffer.wgsl, in the same module, takes 2 to 18 of its own group 1.
@group(1) @binding(19) var<storage, read> arena_page: array<vec2<u32>>;
const PACKED_BASE: u32 = 0x10000000u;
// A vertex's words: position bits, then UV, layer with light, colour.
struct ArenaCorner {
p: vec3<u32>,
r: vec3<u32>,
}
fn arena_vertex(v: u32) -> ArenaCorner {
let a = arena_page[v * 3u];
let b = arena_page[v * 3u + 1u];
let c = arena_page[v * 3u + 2u];
return ArenaCorner(vec3(a.x, a.y, b.x), vec3(b.y, c.x, c.y));
}
// `packed::packed_vertex`: corner `corner` of the record whose words are lo (0 to 2) and
// hi (3 to 5).
fn packed_corner(lo: vec3<u32>, hi: vec3<u32>, corner: u32) -> ArenaCorner {
let orient = (hi.z >> 12u) & 0x3ffffu;
let block = vec3(orient & 15u, (orient >> 4u) & 15u, (orient >> 8u) & 15u);
let axis = (orient >> 12u) & 3u;
let side = (orient >> 14u) & 1u;
let start = (orient >> 15u) & 3u;
let dir = (orient >> 17u) & 1u;
let step = (start + select(corner, 4u - corner, dir == 1u)) & 3u;
let du = select(0u, 1u, step == 1u || step == 2u);
let dw = select(0u, 1u, step >= 2u);
var pos = block;
pos[axis] = block[axis] + side;
pos[(axis + 1u) % 3u] = block[(axis + 1u) % 3u] + du;
pos[(axis + 2u) % 3u] = block[(axis + 2u) % 3u] + dw;
let sel = lo.z >> 24u;
let us = (sel >> (2u * corner)) & 1u;
let vs = (sel >> (2u * corner + 1u)) & 1u;
let u = (lo.z >> (6u * us)) & 63u;
let v = (lo.z >> (12u + 6u * vs)) & 63u;
var light = hi.z;
if corner == 0u {
light = hi.x >> 16u;
} else if corner == 1u {
light = hi.y;
} else if corner == 2u {
light = hi.y >> 12u;
}
light &= 0xfffu;
let packed_light = ((light & 63u) << 2u) | (((light >> 6u) & 63u) << 10u);
let g = (lo.y >> (8u * corner)) & 255u;
let t = lo.x;
let color = (g * ((t >> 16u) & 255u) / 255u) | ((g * ((t >> 8u) & 255u) / 255u) << 8u)
| ((g * (t & 255u) / 255u) << 16u) | (t & 0xff000000u);
return ArenaCorner(bitcast<vec3<u32>>(vec3<f32>(pos)),
vec3((u << 10u) | (v << 26u), (hi.x & 0xffffu) | (packed_light << 16u), color));
}
// A solid draw's vertex `vertex`, and the slot its block is found by (`block_slots`, 256
// slots a block): the vertex's own, or its quad's record's. `packed`: it has a record.
struct SectionCorner {
c: ArenaCorner,
slot: u32,
packed: bool,
}
fn section_corner(vertex: u32) -> SectionCorner {
if vertex < PACKED_BASE {
return SectionCorner(arena_vertex(vertex), vertex, false);
}
let slot = (vertex - PACKED_BASE) >> 2u;
let corner = vertex & 3u;
let a = arena_page[slot * 3u];
let b = arena_page[slot * 3u + 1u];
let c = arena_page[slot * 3u + 2u];
// `packed::FULL`: the quad's four vertices, word 0 slots on.
if (c.y & 0x80000000u) != 0u {
return SectionCorner(arena_vertex(slot + a.x + corner), slot, true);
}
return SectionCorner(packed_corner(vec3(a.x, a.y, b.x), vec3(b.y, c.x, c.y), corner), slot,
true);
}
// The colour as the vertex fetch converts a Unorm8x4 attribute, bit for bit (Apple's M1:
// times 1/255; `unpack4x8unorm` and the correctly rounded c / 255 each differ from it for
// some bytes, and moved a few pixels' colour or alpha cutout).
fn unorm8x4(c: u32) -> vec4<f32> {
return vec4<f32>(vec4(c & 255u, (c >> 8u) & 255u, (c >> 16u) & 255u, c >> 24u))
* (1.0 / 255.0);
}
fn corner_layer(c: ArenaCorner) -> u32 {
return c.r.y & 0xffffu;
}
fn corner_vertex(c: ArenaCorner, origin: vec4<f32>) -> TerrainOut {
let uv = vec2(c.r.x & 0xffffu, c.r.x >> 16u);
let light = vec2((c.r.y >> 16u) & 0xffu, c.r.y >> 24u);
return terrain_vertex(bitcast<vec3<f32>>(c.p), terrain_uv(uv, origin.w), corner_layer(c),
unorm8x4(c.r.z), light, origin.xyz, origin.w);
}
@vertex fn vs_section(@builtin(vertex_index) vertex: u32,
@location(5) origin: vec4<f32>) -> TerrainOut {
return corner_vertex(section_corner(vertex).c, origin);
}
@vertex fn vs_section_opaque(@builtin(vertex_index) vertex: u32,
@location(5) origin: vec4<f32>) -> TerrainOut {
let s = section_corner(vertex);
if !opaque_quad(corner_layer(s.c), origin.w) { return left_out(); }
return corner_vertex(s.c, origin);
}
@vertex fn vs_section_cutout(@builtin(vertex_index) vertex: u32,
@location(5) origin: vec4<f32>) -> TerrainOut {
let s = section_corner(vertex);
if opaque_quad(corner_layer(s.c), origin.w) { return left_out(); }
return corner_vertex(s.c, origin);
}
@vertex fn vs_section_flat(@builtin(vertex_index) vertex: u32) -> TerrainOut {
let s = section_corner(vertex);
return corner_vertex(s.c, slot_origins[block_slots[s.slot >> 8u]]);
}
@vertex fn vs_section_flat_opaque(@builtin(vertex_index) vertex: u32) -> TerrainOut {
let s = section_corner(vertex);
let origin = slot_origins[block_slots[s.slot >> 8u]];
if !opaque_quad(corner_layer(s.c), origin.w) { return left_out(); }
return corner_vertex(s.c, origin);
}
@vertex fn vs_section_flat_cutout(@builtin(vertex_index) vertex: u32) -> TerrainOut {
let s = section_corner(vertex);
let origin = slot_origins[block_slots[s.slot >> 8u]];
if opaque_quad(corner_layer(s.c), origin.w) { return left_out(); }
return corner_vertex(s.c, origin);
}
// HDR lighting: how far a surface's light carries it above paper white, 0 to 1. Only the
// strongest light does, so dark stays as dark as in SDR; sky light by how the face meets the sun.
fn hdr_scene(block: f32, sky: f32, facing: f32) -> f32 {
@@ -448,7 +608,9 @@ fn hdr_mark(tier: u32, y: f32) -> f32 {
}
// `fs_solid` for the opaque pass (`opaque_quad`): no fade, no cutout, no discard.
@fragment fn fs_opaque(in: TerrainOut) -> @location(0) vec4<f32> {
hdr_normal = normalize(cross(dpdy(in.local), dpdx(in.local)));
if globals.hdr_light.z != 0.0 {
hdr_normal = normalize(cross(dpdy(in.local), dpdx(in.local)));
}
let texel = sprite(in.uv, in.layer & 0x7fffu);
var color = texel * in.color;
color = mix(globals.fog_color * vec4(1.0, 1.0, 1.0, color.a), color, in.visibility);
@@ -463,7 +625,9 @@ fn hdr_mark(tier: u32, y: f32) -> f32 {
fn solid_color(in: TerrainOut) -> vec4<f32> {
let dx = dpdx(in.local);
let dy = dpdy(in.local);
hdr_normal = normalize(cross(dy, dx));
if globals.hdr_light.z != 0.0 {
hdr_normal = normalize(cross(dy, dx));
}
if faded(in.fade, in.local, dx, dy) { discard; }
// Bit 15 of the layer marks opaque leaves (forceOpaque): no alpha cutout.
let texel = sprite(in.uv, in.layer & 0x7fffu);
@@ -475,6 +639,11 @@ fn solid_color(in: TerrainOut) -> vec4<f32> {
}
// The rest of a solid pixel's colour once it is kept: emission and fog.
fn solid_finish(in: TerrainOut, texel: vec4<f32>, color: vec4<f32>) -> vec4<f32> {
return solid_finish_at(in, texel, color, dpdx(in.uv), dpdy(in.uv));
}
// `solid_finish` with the UV's screen gradients given (`sprite_at`).
fn solid_finish_at(in: TerrainOut, texel: vec4<f32>, color: vec4<f32>, du: vec2<f32>,
dv: vec2<f32>) -> vec4<f32> {
// Below 0.75, alpha tells HDR output (hdr.wgsl) a light source's pixel
// shines, at which tier (mesher::hdr_tier) and how much (hdr_mark), by the
// texel's own brightness, so its light level and face shading don't change
@@ -482,27 +651,31 @@ fn solid_finish(in: TerrainOut, texel: vec4<f32>, color: vec4<f32>) -> vec4<f32>
// parts, or all of it. Nothing else reads the frame's alpha.
// Fog turns a far surface into the fog's colour: it takes the fog's light with it, or a
// fully fogged mountain would stand out from the fog behind it.
let fogged = max(linear_fog(in.spherical, globals.fog.x, globals.fog.y),
linear_fog(in.cylindrical, globals.fog.z, globals.fog.w)) * globals.fog_color.a;
var emissive = hdr_scene_alpha(mix(hdr_scene(in.scene.x, in.scene.y, hdr_facing()),
globals.hdr_light.y, fogged));
if in.emission > 0u {
// A light source's own face shines as one or stays as drawn, without the lighting.
emissive = 1.0;
let whole = in.emission > 4u;
let tier = select(in.emission, in.emission - 4u, whole);
let l = in.layer & 0x7fffu;
let t = textureLoad(emission_thresholds, vec2(i32(l % SPRITE_SPLIT), i32(l / SPRITE_SPLIT)), 0);
let y = brightness(texel.rgb);
// All over means all over: the sprite's range is one frame's, and an animated sprite's
// other frames dip below it. Fog hides a light source as it hides everything else.
if whole || y >= t.r {
emissive = hdr_mark(tier, y * (1.0 - fogged));
// Without HDR output nothing reads the alpha, so its lighting is not worked out.
var emissive = 1.0;
if globals.hdr_light.z != 0.0 {
let fogged = max(linear_fog(in.spherical, globals.fog.x, globals.fog.y),
linear_fog(in.cylindrical, globals.fog.z, globals.fog.w)) * globals.fog_color.a;
emissive = hdr_scene_alpha(mix(hdr_scene(in.scene.x, in.scene.y, hdr_facing()),
globals.hdr_light.y, fogged));
if in.emission > 0u {
// A light source's own face shines as one or stays as drawn, without the lighting.
emissive = 1.0;
let whole = in.emission > 4u;
let tier = select(in.emission, in.emission - 4u, whole);
let l = in.layer & 0x7fffu;
let t = textureLoad(emission_thresholds, vec2(i32(l % SPRITE_SPLIT), i32(l / SPRITE_SPLIT)), 0);
let y = brightness(texel.rgb);
// All over means all over: the sprite's range is one frame's, and an animated sprite's
// other frames dip below it. Fog hides a light source as it hides everything else.
if whole || y >= t.r {
emissive = hdr_mark(tier, y * (1.0 - fogged));
}
}
}
if in.emissive_layer != 0xffffffffu {
// The high bit: an OptiFine overlay, drawn cutout (opaque where alpha >= 0.1).
var mask = sprite(in.uv, in.emissive_layer & 0x7fffffffu);
var mask = sprite_at(in.uv, in.emissive_layer & 0x7fffffffu, du, dv);
if (in.emissive_layer & 0x80000000u) != 0u {
mask.a = select(0.0, 1.0, mask.a >= 0.1);
}
@@ -0,0 +1,427 @@
// The visibility buffer for solid terrain (gfx/visbuffer.rs, `HORIZON_VISBUFFER=1`), after
// terrain.wgsl in one module. Pass 1 rasterises the flat solid draws writing depth and, per
// pixel, the quad it shows: its arena page and its quad in that page (`vis_id`). Pass 2, one draw for up to 16 pages, runs the shading of `fs_opaque`/`solid_color`
// once per pixel from that ID: it reads the quad's corners from its page as the vertex shaders
// do, runs `terrain_vertex` on the
// triangle the pixel falls in, interpolates its outputs with perspective-correct barycentrics
// and works out the screen gradients `dpdx`/`dpdy` would give, so the texel, mip level, light
// and fog come out as in the normal path.
// Bit 31: terrain is here; bit 30: the quad has a record (`mesher/packed.rs`); bits 24 to 29:
// the arena page (`visbuffer::MAX_PAGES`); bits 0 to 23: the quad's record's slot in the page,
// else its first vertex over 4 (a page holds at most `arena::PAGE_BYTES` / 24 bytes =
// 11 184 810 slots, under 2^24).
fn vis_id(page: u32, s: SectionCorner) -> u32 {
let at = 0x80000000u | ((page & 0x3fu) << 24u);
if s.packed {
return at | 0x40000000u | s.slot;
}
return at | (s.slot >> 2u);
}
// `sprite_at` (terrain.wgsl's `sample_rgss` over `sample_nearest`), sampling only what its
// blends keep: where RGSS has not faded in (the texels span two pixels or more) the nearest
// texel alone, where it has fully, RGSS alone, and its upper mip level only where it blends one
// in. A blend of 0 or 1 gives exactly the one side, so the result is `sprite_at`'s; near
// faces take one tap instead of nine.
fn vis_sprite(tiled: vec2<f32>, layer: u32, du: vec2<f32>, dv: vec2<f32>) -> vec4<f32> {
let uv = tile_uv(tiled);
let tiled_face = any(tiled - uv >= vec2(0.5));
let pixel = vec2(1.0 / globals.filtering.y);
let texel_screen = sqrt(du * du + dv * dv);
if u32(globals.filtering.x) != 1u {
return sample_nearest(uv, layer, pixel, du, dv, texel_screen, tiled_face);
}
let max_texel = max(texel_screen.x, texel_screen.y);
let min_pixel = min(pixel.x, pixel.y);
let blend = smoothstep(min_pixel, min_pixel * 2.0, max_texel);
var nearest = vec4(0.0);
if blend < 1.0 {
nearest = sample_nearest(uv, layer, pixel, du, dv, texel_screen, tiled_face);
}
if blend <= 0.0 {
return nearest;
}
let du_len = length(du);
let dv_len = length(dv);
let effective = sqrt(min(du_len, dv_len) * max(du_len, dv_len));
let exact = max(0.0, log2(effective / min_pixel));
let low = floor(exact);
let mip_blend = fract(exact);
var offsets = array<vec2<f32>, 4>(
vec2(0.125, 0.375), vec2(-0.125, -0.375), vec2(0.375, -0.125), vec2(-0.375, 0.125));
var sum_low = vec4(0.0);
for (var i = 0; i < 4; i++) {
sum_low += sprite_level(uv + offsets[i] * pixel, layer, low);
}
var rgss = sum_low * 0.25;
if mip_blend > 0.0 {
var sum_high = vec4(0.0);
for (var i = 0; i < 4; i++) {
sum_high += sprite_level(uv + offsets[i] * pixel, layer, low + 1.0);
}
rgss = mix(rgss, sum_high * 0.25, mip_blend);
}
return mix(nearest, rgss, blend);
}
struct VisIdOut {
@builtin(position) clip: vec4<f32>,
@location(0) @interpolate(flat) id: u32,
}
// The quads with no cutout that are not fading (`opaque_quad`): no discard, so a tiled GPU
// keeps hiding what lies behind them. `page`: the draw's instance, its arena page
// (`Flat::draw_paged`).
@vertex fn vs_vis_opaque(
@builtin(vertex_index) vertex: u32, @builtin(instance_index) page: u32
) -> VisIdOut {
var out: VisIdOut;
let s = section_corner(vertex);
let origin = slot_origins[block_slots[s.slot >> 8u]];
if !opaque_quad(corner_layer(s.c), origin.w) {
out.clip = vec4(2.0, 2.0, 2.0, 1.0);
return out;
}
let position = bitcast<vec3<f32>>(s.c.p);
out.clip = fade_depth(globals.view_proj * vec4(position + origin.xyz, 1.0), origin.w);
out.id = vis_id(page, s);
return out;
}
@fragment fn fs_vis_id(in: VisIdOut) -> @location(0) u32 {
return in.id;
}
struct VisCutoutOut {
@builtin(position) clip: vec4<f32>,
@location(0) @interpolate(flat) id: u32,
@location(1) uv: vec2<f32>,
@location(2) @interpolate(flat) layer: u32,
// The vertex colour's alpha (`terrain_vertex`'s `color.a`: the lightmap's).
@location(3) alpha: f32,
@location(4) @interpolate(flat) fade: u32,
@location(5) local: vec3<f32>,
}
// The other quads: `solid_color`'s fade dither and alpha cutout, with no shading.
@vertex fn vs_vis_cutout(
@builtin(vertex_index) vertex: u32, @builtin(instance_index) page: u32
) -> VisCutoutOut {
var out: VisCutoutOut;
let s = section_corner(vertex);
let origin = slot_origins[block_slots[s.slot >> 8u]];
let layer = corner_layer(s.c);
if opaque_quad(layer, origin.w) {
out.clip = vec4(2.0, 2.0, 2.0, 1.0);
return out;
}
let position = bitcast<vec3<f32>>(s.c.p);
let uv = vec2(s.c.r.x & 0xffffu, s.c.r.x >> 16u);
let light = vec2((s.c.r.y >> 16u) & 0xffu, s.c.r.y >> 24u);
let pos = position + origin.xyz;
out.clip = fade_depth(globals.view_proj * vec4(pos, 1.0), origin.w);
out.id = vis_id(page, s);
out.uv = terrain_uv(uv, origin.w);
out.layer = layer;
let block = max(f32(light.y), dynamic_block_light(pos));
out.alpha = sample_lightmap(f32(light.x) / 16.0, block / 16.0).a;
out.fade = fade_code(origin.w);
out.local = position;
return out;
}
@fragment fn fs_vis_cutout(in: VisCutoutOut) -> @location(0) u32 {
let dx = dpdx(in.local);
let dy = dpdy(in.local);
if faded(in.fade, in.local, dx, dy) { discard; }
let alpha = vis_sprite(in.uv, in.layer & 0x7fffu, dpdx(in.uv), dpdy(in.uv)).a * in.alpha;
if alpha < 0.5 && (in.layer & 0x8000u) == 0u { discard; }
return in.id;
}
// Pass 2. Up to 16 arena pages (mesher.rs's TerrainVertex, 24 bytes: position, UV as two u16,
// layer and light as u16 each, RGBA8 colour), a quad's 96 bytes as six vec4s; at bindings 0 and
// 1 the block tables of all pages, page after page, `VIS_BLOCKS_PER_PAGE` entries each
// (`Visbuffer::resolve` copies them from the flat draws' own), and the origins by section id
// (terrain.wgsl's flat draws); pass 1's IDs.
override VIS_BLOCKS_PER_PAGE: u32 = 1u;
@group(1) @binding(2) var<storage, read> vis_page_0: array<vec4<u32>>;
@group(1) @binding(3) var<storage, read> vis_page_1: array<vec4<u32>>;
@group(1) @binding(4) var<storage, read> vis_page_2: array<vec4<u32>>;
@group(1) @binding(5) var<storage, read> vis_page_3: array<vec4<u32>>;
@group(1) @binding(6) var<storage, read> vis_page_4: array<vec4<u32>>;
@group(1) @binding(7) var<storage, read> vis_page_5: array<vec4<u32>>;
@group(1) @binding(8) var<storage, read> vis_page_6: array<vec4<u32>>;
@group(1) @binding(9) var<storage, read> vis_page_7: array<vec4<u32>>;
@group(1) @binding(10) var<storage, read> vis_page_8: array<vec4<u32>>;
@group(1) @binding(11) var<storage, read> vis_page_9: array<vec4<u32>>;
@group(1) @binding(12) var<storage, read> vis_page_10: array<vec4<u32>>;
@group(1) @binding(13) var<storage, read> vis_page_11: array<vec4<u32>>;
@group(1) @binding(14) var<storage, read> vis_page_12: array<vec4<u32>>;
@group(1) @binding(15) var<storage, read> vis_page_13: array<vec4<u32>>;
@group(1) @binding(16) var<storage, read> vis_page_14: array<vec4<u32>>;
@group(1) @binding(17) var<storage, read> vis_page_15: array<vec4<u32>>;
@group(1) @binding(18) var vis_ids: texture_2d<u32>;
// A quad's 96 bytes, six 16-byte words from `i` on, of the page in `slot`: one switch for
// all of them, so a thread group whose pixels show several pages walks its cases once.
struct VisQuad {
q: array<vec4<u32>, 6>,
}
fn vis_quad(slot: u32, i: u32) -> VisQuad {
switch slot {
case 0u: {
return VisQuad(array(vis_page_0[i], vis_page_0[i + 1u], vis_page_0[i + 2u],
vis_page_0[i + 3u], vis_page_0[i + 4u], vis_page_0[i + 5u]));
}
case 1u: {
return VisQuad(array(vis_page_1[i], vis_page_1[i + 1u], vis_page_1[i + 2u],
vis_page_1[i + 3u], vis_page_1[i + 4u], vis_page_1[i + 5u]));
}
case 2u: {
return VisQuad(array(vis_page_2[i], vis_page_2[i + 1u], vis_page_2[i + 2u],
vis_page_2[i + 3u], vis_page_2[i + 4u], vis_page_2[i + 5u]));
}
case 3u: {
return VisQuad(array(vis_page_3[i], vis_page_3[i + 1u], vis_page_3[i + 2u],
vis_page_3[i + 3u], vis_page_3[i + 4u], vis_page_3[i + 5u]));
}
case 4u: {
return VisQuad(array(vis_page_4[i], vis_page_4[i + 1u], vis_page_4[i + 2u],
vis_page_4[i + 3u], vis_page_4[i + 4u], vis_page_4[i + 5u]));
}
case 5u: {
return VisQuad(array(vis_page_5[i], vis_page_5[i + 1u], vis_page_5[i + 2u],
vis_page_5[i + 3u], vis_page_5[i + 4u], vis_page_5[i + 5u]));
}
case 6u: {
return VisQuad(array(vis_page_6[i], vis_page_6[i + 1u], vis_page_6[i + 2u],
vis_page_6[i + 3u], vis_page_6[i + 4u], vis_page_6[i + 5u]));
}
case 7u: {
return VisQuad(array(vis_page_7[i], vis_page_7[i + 1u], vis_page_7[i + 2u],
vis_page_7[i + 3u], vis_page_7[i + 4u], vis_page_7[i + 5u]));
}
case 8u: {
return VisQuad(array(vis_page_8[i], vis_page_8[i + 1u], vis_page_8[i + 2u],
vis_page_8[i + 3u], vis_page_8[i + 4u], vis_page_8[i + 5u]));
}
case 9u: {
return VisQuad(array(vis_page_9[i], vis_page_9[i + 1u], vis_page_9[i + 2u],
vis_page_9[i + 3u], vis_page_9[i + 4u], vis_page_9[i + 5u]));
}
case 10u: {
return VisQuad(array(vis_page_10[i], vis_page_10[i + 1u], vis_page_10[i + 2u],
vis_page_10[i + 3u], vis_page_10[i + 4u], vis_page_10[i + 5u]));
}
case 11u: {
return VisQuad(array(vis_page_11[i], vis_page_11[i + 1u], vis_page_11[i + 2u],
vis_page_11[i + 3u], vis_page_11[i + 4u], vis_page_11[i + 5u]));
}
case 12u: {
return VisQuad(array(vis_page_12[i], vis_page_12[i + 1u], vis_page_12[i + 2u],
vis_page_12[i + 3u], vis_page_12[i + 4u], vis_page_12[i + 5u]));
}
case 13u: {
return VisQuad(array(vis_page_13[i], vis_page_13[i + 1u], vis_page_13[i + 2u],
vis_page_13[i + 3u], vis_page_13[i + 4u], vis_page_13[i + 5u]));
}
case 14u: {
return VisQuad(array(vis_page_14[i], vis_page_14[i + 1u], vis_page_14[i + 2u],
vis_page_14[i + 3u], vis_page_14[i + 4u], vis_page_14[i + 5u]));
}
default: {
return VisQuad(array(vis_page_15[i], vis_page_15[i + 1u], vis_page_15[i + 2u],
vis_page_15[i + 3u], vis_page_15[i + 4u], vis_page_15[i + 5u]));
}
}
}
struct VisResolveOut {
@builtin(position) clip: vec4<f32>,
// The group of 16 pages this draw resolves: its instance (`Visbuffer::resolve`).
@location(0) @interpolate(flat) chunk: u32,
}
@vertex fn vs_vis_resolve(@builtin(vertex_index) i: u32,
@builtin(instance_index) chunk: u32) -> VisResolveOut {
let p = vec2(f32(i32(i & 1u) * 4 - 1), f32(i32(i >> 1u) * 4 - 1));
var out: VisResolveOut;
out.clip = vec4(p, 0.0, 1.0);
out.chunk = chunk;
return out;
}
// A framebuffer position's NDC (the world pass draws to the whole target).
fn vis_ndc(at: vec2<f32>, size: vec2<f32>) -> vec2<f32> {
return vec2(at.x / size.x * 2.0 - 1.0, 1.0 - at.y / size.y * 2.0);
}
// Perspective-correct barycentrics of the point at NDC `p` on the triangle with clip-space
// corners a, b, c (x, y, w): homogeneous 2D rasterisation (Olano and Greer). With M the matrix
// of the corners as columns, the weights are M^-1 (p, 1) normalised, and the rows of M^-1 are
// the corners' cross products over the determinant, which the normalisation cancels. Corners
// behind the camera need no clipping. The rows are given (`vis_rows`), as three points share
// them.
fn vis_bary(rows: mat3x3<f32>, p: vec2<f32>) -> vec3<f32> {
let l = vec3(p, 1.0) * rows;
let sum = l.x + l.y + l.z;
if abs(sum) < 1e-30 {
return vec3(-1.0);
}
return l / sum;
}
fn vis_rows(a: vec3<f32>, b: vec3<f32>, c: vec3<f32>) -> mat3x3<f32> {
return mat3x3(cross(b, c), cross(c, a), cross(a, b));
}
// A corner's `terrain_vertex` from its six words: position, UV, layer and light, colour (the
// vertex attributes `TERRAIN_ATTRIBUTES` in gfx.rs give: Float32x3, Uint16x2, Uint16, Uint8x2
// with sky in the low byte, Unorm8x4).
fn vis_corner(position: vec3<u32>, rest: vec3<u32>, origin: vec4<f32>) -> TerrainOut {
let uv = vec2(rest.x & 0xffffu, rest.x >> 16u);
let light = vec2((rest.y >> 16u) & 0xffu, rest.y >> 24u);
return terrain_vertex(bitcast<vec3<f32>>(position), terrain_uv(uv, origin.w),
rest.y & 0xffffu, unpack4x8unorm(rest.z), light, origin.xyz, origin.w);
}
@fragment fn fs_vis_resolve(in: VisResolveOut) -> @location(0) vec4<f32> {
let pixel = vec2<i32>(floor(in.clip.xy));
let id = textureLoad(vis_ids, pixel, 0).x;
let page = (id >> 24u) & 0x3fu;
if (id & 0x80000000u) == 0u || page / 16u != in.chunk {
discard;
}
let slot = page % 16u;
let index = id & 0xffffffu;
// The quad's first vertex (four of them from a multiple of 4) or its record.
var first = 4u * index;
var record = false;
var lo = vec3(0u);
var hi = vec3(0u);
if (id & 0x40000000u) != 0u {
first = index;
// The record's six words from word 6 * index: two 16-byte words from the one it
// starts in, at its start or its middle.
let w = vis_quad(slot, (6u * index) >> 2u).q;
let middle = ((6u * index) & 3u) != 0u;
lo = select(w[0].xyz, vec3(w[0].zw, w[1].x), middle);
hi = select(vec3(w[0].w, w[1].xy), w[1].yzw, middle);
record = (hi.z & 0x80000000u) == 0u;
if !record {
// `packed::FULL`: its four vertices, word 0 slots on.
first = index + lo.x;
}
}
// The quad's block (256 slots: 64 quads of vertices, 256 records) names its section, as
// for `vs_section_flat`.
let block = select(index >> 6u, index >> 8u, (id & 0x40000000u) != 0u);
let origin = slot_origins[block_slots[page * VIS_BLOCKS_PER_PAGE + block]];
var p0: vec3<u32>;
var r0: vec3<u32>;
var p1: vec3<u32>;
var r1: vec3<u32>;
var p2: vec3<u32>;
var r2: vec3<u32>;
var p3: vec3<u32>;
var r3: vec3<u32>;
if record {
let c0 = packed_corner(lo, hi, 0u);
let c1 = packed_corner(lo, hi, 1u);
let c2 = packed_corner(lo, hi, 2u);
let c3 = packed_corner(lo, hi, 3u);
p0 = c0.p;
r0 = c0.r;
p1 = c1.p;
r1 = c1.r;
p2 = c2.p;
r2 = c2.r;
p3 = c3.p;
r3 = c3.r;
} else {
// Corner k is words 6k to 6k + 5 of the quad's 24.
let words = vis_quad(slot, 6u * (first >> 2u)).q;
let q0 = words[0];
let q1 = words[1];
let q2 = words[2];
let q3 = words[3];
let q4 = words[4];
let q5 = words[5];
p0 = q0.xyz;
r0 = vec3(q0.w, q1.x, q1.y);
p1 = vec3(q1.z, q1.w, q2.x);
r1 = q2.yzw;
p2 = q3.xyz;
r2 = vec3(q3.w, q4.x, q4.y);
p3 = vec3(q4.z, q4.w, q5.x);
r3 = q5.yzw;
}
let c0 = (globals.view_proj * vec4(bitcast<vec3<f32>>(p0) + origin.xyz, 1.0)).xyw;
let c1 = (globals.view_proj * vec4(bitcast<vec3<f32>>(p1) + origin.xyz, 1.0)).xyw;
let c2 = (globals.view_proj * vec4(bitcast<vec3<f32>>(p2) + origin.xyz, 1.0)).xyw;
let c3 = (globals.view_proj * vec4(bitcast<vec3<f32>>(p3) + origin.xyz, 1.0)).xyw;
// The quad's triangles are 0 1 2 and 0 2 3 (`Renderer::quad_indices`, flatten.wgsl),
// either side of the diagonal 0 2. Corner 1's weight in 0 1 2 is `vis_bary`'s row
// cross(c2, c0) over the sum of the rows, whose sign is that of the triangle's determinant
// (the sum is one over the point's w), dot(c1, cross(c2, c0)): the pixel lies in 0 1 2 when
// the two agree. A degenerate 0 1 2 (no area, no pixels) leaves it to 0 2 3.
let size = vec2<f32>(textureDimensions(vis_ids));
let centre = in.clip.xy;
let p = vis_ndc(centre, size);
let diagonal = cross(c2, c0);
let det = dot(c1, diagonal);
let second = dot(vec3(p, 1.0), diagonal) * det < 0.0 || det == 0.0;
let rows = vis_rows(c0, select(c1, c2, second), select(c2, c3, second));
let b = vis_bary(rows, p);
// dpdxFine and dpdyFine: the difference to the other pixel of this one's 2x2 quad in its
// row and column, odd minus even, over the same triangle's plane.
let odd = vec2<f32>(pixel & vec2(1));
let toward = vec2(1.0) - 2.0 * odd;
let bx = vis_bary(rows, vis_ndc(centre + vec2(toward.x, 0.0), size));
let by = vis_bary(rows, vis_ndc(centre + vec2(0.0, toward.y), size));
// `terrain_vertex` on the triangle's corners, one at a time into the sums, so that only
// one corner's outputs are held at once; the first is the provoking one, whose flat
// outputs (layer, emission, fade, emissive layer) the rasteriser keeps.
var t = vis_corner(p0, r0, origin);
let uv0 = t.uv;
t.uv = b.x * uv0;
var uv_x = bx.x * uv0;
var uv_y = by.x * uv0;
t.color = b.x * t.color;
t.spherical = b.x * t.spherical;
t.cylindrical = b.x * t.cylindrical;
t.visibility = b.x * t.visibility;
let t1 = vis_corner(select(p1, p2, second), select(r1, r2, second), origin);
t.uv += b.y * t1.uv;
uv_x += bx.y * t1.uv;
uv_y += by.y * t1.uv;
t.color += b.y * t1.color;
t.spherical += b.y * t1.spherical;
t.cylindrical += b.y * t1.cylindrical;
t.visibility += b.y * t1.visibility;
let t2 = vis_corner(select(p2, p3, second), select(r2, r3, second), origin);
t.uv += b.z * t2.uv;
uv_x += bx.z * t2.uv;
uv_y += by.z * t2.uv;
t.color += b.z * t2.color;
t.spherical += b.z * t2.spherical;
t.cylindrical += b.z * t2.cylindrical;
t.visibility += b.z * t2.visibility;
let du = (uv_x - t.uv) * toward.x;
let dv = (uv_y - t.uv) * toward.y;
// HDR output alone reads the light levels and the face's normal (as in `fs_opaque`):
// `terrain_vertex` gives them as the block light over 16 and the sky light over 16, and the
// section-relative position.
if globals.hdr_light.z != 0.0 {
let local = array(bitcast<vec3<f32>>(p0), bitcast<vec3<f32>>(select(p1, p2, second)),
bitcast<vec3<f32>>(select(p2, p3, second)));
// `t.scene` is still the first corner's.
t.scene = b.x * t.scene + b.y * t1.scene + b.z * t2.scene;
t.local = b.x * local[0] + b.y * local[1] + b.z * local[2];
let dlx = (bx.x * local[0] + bx.y * local[1] + bx.z * local[2] - t.local) * toward.x;
let dly = (by.x * local[0] + by.y * local[1] + by.z * local[2] - t.local) * toward.y;
hdr_normal = normalize(cross(dly, dlx));
}
// `fs_opaque` and `solid_color` past their discards, which pass 1 already made.
let texel = vis_sprite(t.uv, t.layer & 0x7fffu, du, dv);
var color = texel * t.color;
color = mix(globals.fog_color * vec4(1.0, 1.0, 1.0, color.a), color, t.visibility);
return solid_finish_at(t, texel, color, du, dv);
}
@@ -0,0 +1,501 @@
{
"horizon.options.controller": "المراقب المالي",
"horizon.options.vibration": "الاهتزاز",
"horizon.options.adaptive_triggers": "المشغلات التكيفية",
"horizon.options.lightbar": "الشريط الضوئي",
"horizon.options.look_sensitivity": "حساسية النظر",
"horizon.options.invert_x": "عكس محور النظر X",
"horizon.options.invert_y": "عكس محور النظر Y",
"horizon.options.sneak_button": "زر التسلل",
"horizon.options.move_deadzone": "المنطقة الميتة للحركة",
"horizon.options.look_deadzone": "المنطقة الميتة للنظر",
"horizon.options.button_glyphs": "الحروف الرسومية للأزرار",
"horizon.options.menu_navigation": "التنقل في القائمة",
"horizon.options.on_screen_keyboard": "لوحة المفاتيح على الشاشة",
"horizon.options.chat_delay": "تأخير الدردشة",
"horizon.options.lightbar.health": "الصحة",
"horizon.options.lightbar.dimension": "البعد",
"horizon.options.glyphs.auto": "تلقائي",
"horizon.options.glyphs.xbox": "اكس بوكس",
"horizon.options.glyphs.playstation": "بلاي ستيشن",
"horizon.options.glyphs.nintendo": "نينتندو",
"horizon.options.menu_focus": "التركيز",
"horizon.options.menu_pointer": "المؤشر",
"horizon.options.keyboard.auto": "تلقائي",
"horizon.options.keyboard.steam": "البخار",
"horizon.options.unavailable": "هذه الميزة غير متوفرة بعد في Horizon.",
"horizon.options.search": "إعدادات البحث...",
"horizon.pages.mods": "تعديل",
"horizon.pages.shader_packs": "حزم شادر",
"horizon.pages.shader_options": "خيارات التظليل",
"horizon.pages.controller": "إعدادات وحدة التحكم",
"horizon.pages.controller_binds": "ربط وحدة التحكم",
"horizon.pages.extras": "إضافات Horizon",
"horizon.pages.settings": "إعدادات Horizon",
"horizon.pages.agent": "وكيل منظمة العفو الدولية",
"horizon.split.leave": "غادر",
"horizon.pages.split_settings": "إعدادات تقسيم الشاشة",
"horizon.pages.split_profiles": "من يلعب؟",
"horizon.pages.split_setup": "إعداد تقسيم الشاشة",
"horizon.pages.music": "موسيقى",
"horizon.pages.music.menu": "القائمة",
"horizon.pages.music.overworld": "العالم الخارجي",
"horizon.pages.music.creative": "إبداعي",
"horizon.pages.music.underwater": "تحت الماء",
"horizon.pages.music.end": "النهاية",
"horizon.pages.music.boss": "رئيس",
"horizon.pages.music.credits": "الاعتمادات",
"horizon.pages.music.overworld_biomes": "المناطق الأحيائية في العالم الخارجي",
"horizon.pages.music.nether_biomes": "المناطق الأحيائية السفلى",
"horizon.pages.music.end_biomes": "نهاية المناطق الأحيائية",
"horizon.pages.music.other": "موسيقى أخرى",
"horizon.pages.music.empty": "لا توجد مقطوعات موسيقية: لا يتم تحميل أصوات اللعبة.",
"horizon.pages.music.tooltip": "المسارات المضمنة، حسب الموقف: العب واحدة الآن، أو قم بإيقاف تشغيل أي منها حتى تتوقف اللعبة عن اختيارها.",
"horizon.pages.settings.tooltip": "إعدادات Horizon الخاصة: الرسومات ووحدات التحكم والإضافات والتعديلات.",
"horizon.pages.graphics.tooltip": "الرسومات ببساطة: كل إعداد يوضح تكلفته.",
"horizon.pages.graphics_advanced.tooltip": "كل إعدادات الرسومات، بما في ذلك Horizon، وتكلفة كل منها.",
"horizon.pages.controller.tooltip": "وحدات التحكم: الأزرار والعصي والاهتزاز والتنقل في القائمة.",
"horizon.pages.extras.tooltip": "الإضافات الاختيارية، كلها متوقفة بشكل افتراضي: تظل اللعبة عادية حتى تقوم بتشغيلها.",
"horizon.pages.agent.tooltip": "اسمح لوكيل الذكاء الاصطناعي الخاص بك باللعب: عملاء Horizon-ctl وMCP على هذا الكمبيوتر.",
"horizon.pages.split_profiles.tooltip": "من يلعب: ملف تعريف محفوظ في مجلد اللعبة هذا.",
"horizon.pages.split_setup.tooltip": "النوافذ والشاشات ومن يلعب أين.",
"horizon.pages.shader_packs.tooltip": "حزم Shader من مجلد Shaderpacks: الخاصة بشركة Horizon وتلك الموجودة في تنسيق التظليل/. واحد يعمل في وقت واحد.",
"horizon.pages.mods.tooltip": "التعديلات المعدة لـ Horizon، من مجلد Horizon-mods. يعمل كل منها في وضع الحماية ويظل مغلقًا حتى تقوم بتشغيله.",
"horizon.pages.open.graphics": "الرسومات...",
"horizon.pages.open.graphics_advanced": "رسومات متقدمة...",
"horizon.pages.open.shader_packs": "حزم التظليل...",
"horizon.pages.open.controller": "إعدادات وحدة التحكم...",
"horizon.pages.open.split_setup": "شاشة مقسمة...",
"horizon.pages.open.extras": "إضافات...",
"horizon.pages.open.mods": "تعديل...",
"horizon.pages.open.agent": "وكيل الذكاء الاصطناعي...",
"horizon.pages.open.horizon_graphics": "رسومات Horizon...",
"horizon.pages.open.controller_binds": "ربط وحدة التحكم...",
"horizon.pages.open.horizon_settings": "إعدادات Horizon...",
"horizon.pages.open.music": "موسيقى...",
"horizon.mods.empty": "لا توجد تعديلات: ضع ملفات .hmod في مجلد Horizon-mods",
"horizon.mods.stopped": " (متوقف)",
"horizon.mods.not_built": " (لم يتم بناؤه)",
"horizon.mods.dev": " (ديف)",
"horizon.mods.settings": "الإعدادات",
"horizon.mods.in_world": " (اترك العالم ليتغير)",
"horizon.mods.open_folder": "افتح مجلد التعديل",
"horizon.shader_packs.empty": "لا توجد حزم تظليل: ضعها في مجلدshaderpacks",
"horizon.shader_options.open": "خيارات التظليل...",
"horizon.shader_options.profile": "الملف الشخصي",
"horizon.shader_options.loading": "قراءة خيارات حزمة التظليل...",
"horizon.agent.copy_details": "نسخ تفاصيل الاتصال",
"horizon.multiplayer.join": "انضم",
"horizon.multiplayer.cancel_reconnecting": "إلغاء إعادة الاتصال",
"horizon.multiplayer.join_friend": "انضم إلى صديق",
"horizon.multiplayer.invite_code": "رمز الدعوة",
"horizon.multiplayer.relay": "التتابع (اختياري)",
"Preset": "محددة مسبقا",
"LOD Distance": "مسافة اللد",
"Far Detail": "تفاصيل بعيدة",
"Cave Culling": "إعدام الكهف",
"Entity Culling": "إعدام الكيان",
"Chunk Updates": "تحديثات القطعة",
"Upload Budget": "تحميل الميزانية",
"Sky": "السماء",
"Fog": "ضباب",
"Weather": "الطقس",
"Animated Textures": "القوام المتحركة",
"Present Mode": "الوضع الحالي",
"Frame Pacing": "سرعة الإطار",
"Worker Threads": "خيوط العمال",
"Resolution Scale": "مقياس القرار",
"Anti-aliasing": "مكافحة التعرج",
"Upscaling": "الارتقاء",
"Paper White": "ورقة بيضاء",
"Peak Brightness": "ذروة السطوع",
"Black Level": "المستوى الأسود",
"UI Brightness": "سطوع واجهة المستخدم",
"Battery Mode": "وضع البطارية",
"Graphics API": "واجهة برمجة تطبيقات الرسومات",
"Translucent Batching": "الخلط الشفاف",
"Performance Overlay": "تراكب الأداء",
"Full Detail Distance": "مسافة التفاصيل الكاملة",
"On": "على",
"Off": "إيقاف",
"Unlimited": "غير محدود",
"Auto": "تلقائي",
"Custom": "مخصص",
"Performance": "الأداء",
"Balanced": "متوازن",
"Quality": "الجودة",
"Ultra": "الترا",
"Ultra Performance": "أداء فائق",
"Native": "أصلي",
"Full": "كامل",
"Reduced": "مخفض",
"Efficient": "كفاءة",
"Precise": "دقيق",
"Auto (VSync)": "تلقائي (VSync)",
"FIFO": "يصرف أولاً",
"Mailbox": "صندوق البريد",
"Immediate": "فوري",
"Vulkan": "فولكان",
"DirectX 12": "دايركت اكس 12",
"OpenGL": "برنامج OpenGL",
"FPS and Graph": "FPS والرسم البياني",
"FPS": "إطارا في الثانية",
"TAA": "تأ",
"FXAA": "فكسا",
"No cost": "لا تكلفة",
"Low cost": "تكلفة منخفضة",
"Medium cost": "تكلفة متوسطة",
"High cost": "تكلفة عالية",
"Saves time": "يوفر الوقت",
"HDR": "تقرير التنمية البشرية",
"Graphics": "الرسومات",
"Done": "تم",
"This feature is not yet available in Horizon.": "هذه الميزة غير متوفرة بعد في Horizon.",
"Your display or system doesn't offer HDR output.": "لا توفر شاشتك أو نظامك مخرجات HDR.",
"Turn HDR on to use it.": "قم بتشغيل HDR لاستخدامه.",
"Your GPU or graphics API doesn't support it.": "وحدة معالجة الرسومات (GPU) أو واجهة برمجة تطبيقات الرسومات الخاصة بك لا تدعمها.",
"%s chunks": "%s قطع",
"%s per frame": "%s لكل إطار",
"%s MiB/frame": "%s MiB/الإطار",
"%s KiB/frame": "%s كيلو بايت/الإطار",
"Auto (%s)": "تلقائي (%s)",
"Full-detail terrain range. LOD Distance can extend local worlds farther.": "نطاق التضاريس كامل التفاصيل. يمكن لمسافة LOD أن تمتد إلى عوالم محلية أبعد.",
"Coarse distant terrain in local worlds. Integrated GPUs stop at 128 chunks.": "التضاريس البعيدة الخشنة في العوالم المحلية. تتوقف وحدات معالجة الرسومات المدمجة عند 128 قطعة.",
"Reduced draws far terrain coarser: faster on this integrated GPU.": "تم تقليل الرسم على التضاريس البعيدة: بشكل أسرع على وحدة معالجة الرسومات المدمجة هذه.",
"Reduced draws far terrain coarser, for GPUs it slows down.": "يتم تقليل الرسوم على التضاريس البعيدة بشكل أكثر خشونة، أما بالنسبة لوحدات معالجة الرسومات فإنها تبطئ.",
"Field of view. Wider shows more terrain at once.": "مجال الرؤية. يُظهر العرض الأوسع المزيد من التضاريس في وقت واحد.",
"Caps frames per second; a cap saves power and heat.": "قبعات الإطارات في الثانية الواحدة؛ غطاء يوفر الطاقة والحرارة.",
"Waits for the display's refresh: no tearing, a little latency.": "في انتظار تحديث الشاشة: بدون تمزق، وقليل من زمن الوصول.",
"Size of menus and the HUD.": "حجم القوائم وHUD.",
"Sets the options below together. Changing one makes it Custom.": "يضبط الخيارات أدناه معًا. تغيير واحد يجعله مخصصًا.",
"Lava, fire and sunlight shine brighter than white. Needs an HDR display.": "الحمم البركانية والنار وأشعة الشمس تتألق أكثر من اللون الأبيض. يحتاج إلى شاشة HDR.",
"Your display's darkest black. 0 for OLED; LCDs glow a little.": "اللون الأسود الداكن لشاشتك. 0 لـ OLED؛ تتوهج شاشات LCD قليلاً.",
"How bright highlights get. Auto: the peak your system reports.": "كيف تحصل على النقاط البارزة الساطعة. تلقائي: ذروة تقارير النظام الخاص بك.",
"How bright white paper and menus look. Auto: your desktop's white.": "كيف تبدو الورق والقوائم البيضاء الزاهية. تلقائي: سطح المكتب الخاص بك باللون الأبيض.",
"How bright the HUD and menus are, against paper white.": "مدى سطوع شاشة HUD والقوائم مقابل الورق الأبيض.",
"How far mobs, crops and machines keep working. CPU time.": "إلى أي مدى يستمر الغوغاء والمحاصيل والآلات في العمل. وقت وحدة المعالجة المركزية.",
"How far away mobs and items are drawn, as a share of normal.": "إلى أي مدى يتم رسم الغوغاء والعناصر، كنسبة من المعدل الطبيعي.",
"Skips terrain hidden behind closed sections. Off costs a lot.": "يتخطى التضاريس المخفية خلف الأقسام المغلقة. قبالة تكاليف الكثير.",
"Hides entities behind opaque blocks.": "يخفي الكيانات خلف الكتل غير الشفافة.",
"No entity occlusion culling.": "لا يوجد إعدام انسداد الكيان.",
"CPU occlusion test runs this frame.": "يقوم اختبار انسداد وحدة المعالجة المركزية بتشغيل هذا الإطار.",
"Occlusion checks run on a worker thread.": "يتم تشغيل عمليات فحص الانسداد على مؤشر ترابط عامل.",
"Meshed sections uploaded per frame. Lower is smoother while loading.": "تم تحميل المقاطع المتشابكة لكل إطار. الجزء السفلي أكثر سلاسة أثناء التحميل.",
"Soft shadows in corners. Costs chunk building time only.": "ظلال ناعمة في الزوايا. تكاليف بناء قطعة قطعة فقط.",
"Smaller copies of block textures for distant terrain: less shimmer.": "نسخ أصغر من أنسجة الكتل للتضاريس البعيدة: أقل وميضًا.",
"Blends grass and water colours across biomes when building chunks.": "يمزج ألوان العشب والماء عبر المناطق الأحيائية عند بناء القطع.",
"Cloud layer: off, flat (fast) or 3D (fancy).": "طبقة السحابة: معطلة، مسطحة (سريعة) أو ثلاثية الأبعاد (فاخرة).",
"How far clouds reach, in chunks.": "إلى أي مدى تصل السحب، في قطع.",
"Draws the sky, sun, moon and stars.": "يرسم السماء والشمس والقمر والنجوم.",
"Distance fog. Off shows the edge of the loaded world.": "ضباب المسافة. يظهر Off حافة العالم المحمل.",
"Draws rain and snow.": "يرسم المطر والثلج.",
"How far rain and snow fall around you.": "إلى أي مدى تسقط الأمطار والثلوج من حولك.",
"How many particles effects spawn.": "كم عدد الجسيمات التي تفرخ الآثار.",
"Round shadows under mobs and items.": "ظلال مستديرة تحت الغوغاء والعناصر.",
"Leaves with see-through gaps. Off draws them solid.": "الأوراق بها فجوات شفافة. قبالة يرسمهم الصلبة.",
"Sorts water and glass more exactly behind each other.": "يقوم بفرز الماء والزجاج بشكل أكثر دقة خلف بعضهما البعض.",
"Which chunk rebuilds wait for the frame: none, nearby or yours.": "أي قطعة سيتم إعادة بنائها تنتظر الإطار: لا شيء، قريب أو خاص بك.",
"Animates water, lava, fire and other moving textures.": "ينعش الماء والحمم والنار وغيرها من القوام المتحرك.",
"World pixels per screen pixel. Below 100% is faster on the GPU.": "بكسل العالم لكل بكسل الشاشة. أقل من 100% أسرع على وحدة معالجة الرسومات.",
"Smooths jagged edges. FXAA: softer. TAA: smoothest, moving things may trail.": "ينعم الحواف الخشنة. FXAA: أكثر ليونة. TAA: قد تتبع الأشياء الأكثر سلاسة وتحريكًا.",
"Renders the world smaller and rebuilds it with TAA. Faster, softer.": "يجعل العالم أصغر حجمًا ويعيد بنائه باستخدام TAA. أسرع وأكثر ليونة.",
"HDR output on an HDR display: lava, fire and sunlight shine brighter.": "إخراج HDR على شاشة HDR: تتألق الحمم البركانية والنار وأشعة الشمس بشكل أكثر سطوعًا.",
"How frames reach the screen while VSync is off.": "كيفية وصول الإطارات إلى الشاشة أثناء إيقاف تشغيل VSync.",
"Efficient sleeps until the next frame; Precise spins, like vanilla.": "ينام بكفاءة حتى الإطار التالي؛ يدور بدقة، مثل الفانيليا.",
"Fills the screen (borderless).": "يملأ الشاشة (بلا حدود).",
"Brightens dark places.": "يضيء الأماكن الداكنة.",
"Lowers the frame rate when minimised, or idle too.": "يخفض معدل الإطارات عند تصغيره أو في وضع الخمول أيضًا.",
"Sways the view while walking.": "يتأرجح المنظر أثناء المشي.",
"Fades newly loaded chunks in.": "يتلاشى القطع المحملة حديثًا.",
"Darkens the screen's edges.": "لتغميق حواف الشاشة.",
"Shows when the world saves.": "يظهر عندما ينقذ العالم.",
"Shows attack cooldown.": "يظهر تباطؤ الهجوم.",
"60 FPS cap (30 in menus or unfocused), half the workers: less power.": "60 إطارًا في الثانية (30 في القوائم أو غير مركزة)، نصف العمال: طاقة أقل.",
"Threads that generate, light and mesh chunks. Next start.": "الخيوط التي تولد القطع الخفيفة والشبكية. البداية التالية.",
"Vulkan, then DirectX 12 (Windows) or OpenGL (Linux) where it fails. Next start.": "Vulkan، ثم DirectX 12 (Windows) أو OpenGL (Linux) حيث يفشل. البداية التالية.",
"Water and glass in one buffer: fewer draw calls, a bit more VRAM. Next start.": "الماء والزجاج في مخزن مؤقت واحد: عدد أقل من مكالمات السحب، والمزيد من VRAM. البداية التالية.",
"Mesh data sent to the GPU per frame. Lower is smoother while loading.": "يتم إرسال بيانات الشبكة إلى وحدة معالجة الرسومات لكل إطار. الجزء السفلي أكثر سلاسة أثناء التحميل.",
"Frame rate and frame times over the game, with a graph.": "معدل الإطارات وأوقات الإطار خلال اللعبة، مع رسم بياني.",
"horizon.multiplayer.finding_friend": "البحث عن عالم صديقك...",
"horizon.multiplayer.not_signed_in": "هذا الخادم في وضع الاتصال بالإنترنت. قم بتسجيل الدخول باستخدام حساب Microsoft الخاص بك في Horizon Launcher للانضمام إليه.",
"horizon.multiplayer.invalid_address": "عنوان الخادم غير صالح: %s",
"horizon.multiplayer.connected_friend_direct": "تواصل مباشرة مع صديقك..",
"horizon.multiplayer.connected_friend_relay": "متصل بصديقك من خلال التتابع...",
"General": "عام",
"Advanced": "متقدم",
"Undo": "تراجع",
"Search options": "خيارات البحث",
"Shortcut": "الاختصار",
"Distance": "المسافة",
"Display": "عرض",
"Interface": "واجهة",
"Sky and weather": "السماء والطقس",
"Lighting and entities": "الإضاءة والكيانات",
"Textures": "القوام",
"Image": "صورة",
"Chunk loading": "تحميل قطعة",
"Culling": "إعدام",
"Power": "القوة",
"Frames": "إطارات",
"Overlay": "تراكب",
"Output": "الإخراج",
"Brightness": "السطوع",
"How far you see, the window and the HUD.": "إلى أي مدى ترى النافذة وشاشة HUD.",
"The sky and weather, lighting, textures and the image.": "السماء والطقس والإضاءة والقوام والصورة.",
"Chunk loading, culling and power use.": "تحميل القطع وإعدامها واستخدام الطاقة.",
"How frames reach the screen, and the performance overlay.": "كيفية وصول الإطارات إلى الشاشة وتراكب الأداء.",
"Brighter-than-white output on an HDR display.": "إخراج أكثر سطوعًا من اللون الأبيض على شاشة HDR.",
"Results for \"%s\"": "نتائج ل \"%s\"",
"No settings match.": "لا توجد إعدادات متطابقة.",
"horizon.title.not_affiliated": "لا ينتمي إلى Mojang أو Microsoft",
"horizon.extras.header.lighting": "الإضاءة",
"horizon.extras.header.third_person": "شخص ثالث",
"horizon.extras.header.particles": "الجسيمات",
"horizon.extras.header.inventory": "المخزون",
"horizon.extras.header.chat": "الدردشة",
"horizon.extras.header.multiplayer": "متعددة اللاعبين",
"horizon.extras.header.sound": "الصوت",
"horizon.extras.header.menus": "القوائم",
"horizon.extras.fullbright": "فولبرايت",
"horizon.extras.dynamic_lights": "أضواء ديناميكية",
"horizon.extras.own_name_tag": "علامة الاسم الخاصة",
"horizon.extras.hide_block_particles": "إخفاء جزيئات كسر الكتلة",
"horizon.extras.auto_reconnect": "إعادة الاتصال التلقائي",
"horizon.extras.ui_sound_reserve": "احتفظ بقنوات لأصوات واجهة المستخدم",
"horizon.extras.music_page": "صفحة الموسيقى",
"horizon.extras.mouse_tweaks": "الضوابط بتعديل الماوس",
"horizon.extras.mouse_tweaks_wheel": "عجلة التمرير تنقل العناصر",
"horizon.extras.sort": "أزرار الفرز",
"horizon.extras.sort_key": "مفتاح الفرز",
"horizon.extras.no_ai": "لا يوجد ذكاء اصطناعي",
"horizon.extras.agent_control": "مراقبة الوكيل",
"horizon.extras.discord_presence": "وجود الخلاف الغني",
"horizon.extras.splitscreen": "تقسيم الشاشة",
"horizon.extras.chat_animation": "دردشة سلسة",
"horizon.extras.chat_indicator": "مؤشر الرسالة",
"horizon.extras.wheel_cycles_settings": "عجلة التمرير تغير الإعدادات",
"horizon.extras.pack_browser": "متصفح حزمة الموارد",
"horizon.extras.fullbright.tooltip": "إظهار الكتل والكيانات في الضوء الكامل، حتى في المناطق المظلمة.",
"horizon.extras.dynamic_lights.tooltip": "تم حمل المشاعل ومصادر الضوء الأخرى أو إسقاطها أو إشعال النار فيها على الكتل المحيطة بها.",
"horizon.extras.own_name_tag.tooltip": "يظهر اسمك فوق رأسك بصيغة الغائب، كما يراه اللاعبون الآخرون. يكون مخفيًا عندما يخفي الخادم أسماء فريقك أو عندما تكون غير مرئي.",
"horizon.extras.hide_block_particles.tooltip": "يخفي جزيئات الحطام التي تنفجر من كتلة مكسورة وتتفتت من تلك التي قمت بتعدينها. وتبقى الجزيئات الأخرى.",
"horizon.extras.auto_reconnect.tooltip": "إعادة الانضمام إلى الخادم بعد انقطاع الاتصال أو إعادة التشغيل، وليس بعد ركلة أو حظر أبدًا.",
"horizon.extras.ui_sound_reserve.tooltip": "تترك الأصوات في العالم 16 قناة صوتية من أصل 247 قناة مجانية، لذا فإن طوفانًا منها (انفجار كبير) لا يمكنه إسكات نقرات القائمة.",
"horizon.extras.music_page.tooltip": "تحصل الموسيقى والأصوات على صفحة موسيقى...: قم بتشغيل أي مسار مضمن الآن، أو قم بإيقاف تشغيله حتى تتوقف اللعبة عن اختياره. لا شيء يتغير حتى تقوم بإيقاف تشغيل المسار.",
"horizon.extras.mouse_tweaks.tooltip": "يؤدي السحب الأيمن إلى وضع عنصر واحد في كل فتحة، بينما يقوم السحب الأيسر بتجميع العنصر المحفوظ، بينما يقوم Shift + السحب الأيسر بنقل كل فتحة.",
"horizon.extras.mouse_tweaks_wheel.tooltip": "يرسل الجزء السفلي عنصرًا واحدًا من الفتحة إلى الجانب الآخر، بينما يقوم الجزء العلوي بإحضار عنصر واحد مرة أخرى.",
"horizon.extras.sort.tooltip": "يقوم بفرز المخزون والصناديق والبراميل وصناديق النهاية وصناديق الشولكر بترتيب علامات تبويب إبداعية، ودمج الأكوام.",
"horizon.extras.sort_key.tooltip": "فرز الجزء الموجود تحت المؤشر. انقر، ثم اضغط على مفتاح؛ الهروب يفككه.",
"horizon.extras.no_ai.tooltip": "يخفي ويوقف تشغيل كل ميزات الذكاء الاصطناعي: التحكم بالوكيل، Horizon-ctl وخوادم MCP. مفتاح المشغل أيضًا.",
"horizon.extras.agent_control.tooltip": "يمكن لوكيل الذكاء الاصطناعي الخاص بك لعب هذه اللعبة من خلال Horizon-ctl أو عميل MCP، على هذا الكمبيوتر فقط.",
"horizon.extras.discord_presence.tooltip": "يعرض Playing Horizon على ملف تعريف Discord الخاص بك أثناء تشغيل Discord: القوائم، أو اللاعب الفردي أو المتعدد، والبعد ووقت اللعب. لا يوجد أبدًا اسم عالمي أو عنوان خادم.",
"Calibrate...": "معايرة...",
"Calibrate Anyway...": "معايرة على أية حال...",
"Use Automatic Setup": "استخدم الإعداد التلقائي",
"Shortcut: %s": "الاختصار: %s",
"Next": "التالي",
"HDR Calibration %s/%s: %s": "معايرة HDR %s/%s: %s",
"Sets the three below full screen, one test picture at a time.": "لتعيين الصور الثلاثة أدناه بملء الشاشة، صورة اختبارية واحدة في كل مرة.",
"A key that opens this screen from the game. Not bound at first.": "المفتاح الذي يفتح هذه الشاشة من اللعبة. غير ملزمة في البداية.",
"Your display didn't say how bright it gets: calibrate to set it up.": "لم توضح شاشتك مدى سطوعها: قم بالمعايرة لإعدادها.",
"Already set up for your display. Only calibrate if HDR looks wrong.": "تم إعداده بالفعل للعرض الخاص بك. قم بالمعايرة فقط إذا كان تقرير HDR يبدو خاطئًا.",
"Puts Peak Brightness and Paper White back to your display's setup.": "يعيد ذروة السطوع والورق الأبيض إلى إعداد شاشتك.",
"Set up for your display. Leave on Auto unless it looks wrong.": "قم بإعداد العرض الخاص بك. اتركه على الوضع التلقائي ما لم يبدو خاطئًا.",
"Lower it until the logo just disappears into the black.": "قم بخفضه حتى يختفي الشعار باللون الأسود.",
"Raise it until the logo just disappears into the bright square.": "ارفعه حتى يختفي الشعار في المربع المشرق.",
"Make the card a white that's comfortable to look at for a long time, in the light you play in.": "اجعل البطاقة بيضاء اللون بحيث تكون مريحة عند النظر إليها لفترة طويلة، في الضوء الذي تلعب فيه.",
"horizon.splitscreen.profiles.forget": "ننسى",
"horizon.splitscreen.profiles.create": "إنشاء",
"horizon.splitscreen.profiles.you": " - أنت",
"horizon.splitscreen.profiles.forget_named": "ننسى %s",
"horizon.splitscreen.profiles.previous": "السابق",
"horizon.splitscreen.profiles.next": "التالي",
"horizon.splitscreen.profiles.new_button": "ملف تعريف جديد...",
"horizon.splitscreen.profiles.forget_title": "هل نسيت الملف الشخصي؟",
"horizon.splitscreen.profiles.forget_leaves": "فإنه يترك قائمة هذا المثيل.",
"horizon.splitscreen.profiles.forget_kept": "يتم الاحتفاظ بالتقدم العالمي والإعدادات.",
"horizon.splitscreen.profiles.new_title": "ملف تعريف جديد",
"horizon.splitscreen.profiles.name_hint": "الاسم (من 3 إلى 16 حرفًا ورقمًا _)",
"horizon.splitscreen.profiles.switch_title": "تبديل الملف الشخصي",
"horizon.splitscreen.profiles.offline_note": "تنتمي الملفات الشخصية غير المتصلة بالإنترنت إلى هذه الحالة",
"horizon.splitscreen.profiles.move": "تحرك حيث تلعب",
"horizon.splitscreen.profiles.move_place": "تحرك حيث تلعب: %s",
"horizon.friends.title": "العب مع الأصدقاء",
"horizon.friends.hint": "يقوم الأصدقاء بلصق الرمز بعد زر الأصدقاء على شاشة العنوان، أو في الاتصال المباشر، أو على صفحة التشغيل الخاصة بالمشغل.",
"horizon.friends.copied": "منقول",
"horizon.friends.copy_code": "نسخ الرمز",
"horizon.friends.stop_sharing": "توقف عن المشاركة",
"horizon.friends.none_yet": "لا يوجد أصدقاء هنا بعد.",
"horizon.friends.here_now": "هنا الآن: %s",
"horizon.friends.share_intro": "شارك هذا العالم خلف رمز الدعوة: فهو يفتح على شبكة LAN، وينضم الأصدقاء على الإنترنت باستخدام الرمز. لا يوجد خادم خاص بنا متورط.",
"horizon.friends.start_sharing": "ابدأ المشاركة",
"horizon.friends.troubleshooting": "استكشاف الأخطاء وإصلاحها...",
"horizon.friends.stopped": "تم إيقاف مشاركة رمز الدعوة.",
"horizon.friends.short_code_changed": "استمر شخص ما في تجربة رمز قصير خاطئ، لذلك تغير.",
"horizon.friends.wrong_code": "حاول شخص ما رمزا خاطئا.",
"horizon.friends.code_ready": "رمز الدعوة الخاص بك جاهز: قائمة الألعاب، العب مع الأصدقاء. انسخها وأرسلها إلى أصدقائك.",
"horizon.friends.share_failed": "لا يمكن مشاركة العالم: %s",
"horizon.friends.finding_route": "التعرف على كيفية وصول الأصدقاء إليك...",
"horizon.osk.shift": "التحول",
"horizon.osk.space": "الفضاء",
"horizon.osk.delete": "حذف",
"horizon.osk.type": "اكتب",
"horizon.osk.symbols": "الرموز",
"horizon.osk.close": "إغلاق",
"horizon.extras.chat_animation.tooltip": "ينزلق خط الدردشة الجديد من اليسار بينما يتلاشى للداخل، بدلاً من أن يظهر كاملاً.",
"horizon.extras.chat_indicator.tooltip": "الشريط الملون الموجود على يسار خط الدردشة.",
"horizon.extras.wheel_cycles_settings.tooltip": "عجلة التمرير فوق زر في الإعدادات تغير قيمته، كما هو الحال في الفانيليا. مع إيقاف التشغيل، تقوم العجلة بتمرير القائمة فقط.",
"horizon.extras.pack_browser.tooltip": "تحديد حزم الموارد يحصل على زر \"إضافة\" الذي يبحث في Modrinth ويقوم بتثبيت حزمة في مجلد الحزم الخاص بك. مع إيقاف التشغيل، لن تتصل اللعبة أبدًا بـ Modrinth.",
"horizon.extras.splitscreen.tooltip": "في عالم ما، يمكن لوحدة تحكم أخرى الانضمام كلاعب جديد: اضغط على A عندما يُطلب منك ذلك، ثم اختر ملفًا شخصيًا ومكان اللعب.",
"horizon.splitscreen.setup.monitor": "مراقب %s",
"horizon.splitscreen.setup.monitor_unknown": "شاشة",
"horizon.splitscreen.setup.window": "نافذة %s",
"horizon.splitscreen.setup.new_window": "نافذة جديدة",
"horizon.splitscreen.setup.fill_monitor": "املأ %s",
"horizon.splitscreen.setup.done": "تم",
"horizon.splitscreen.setup.on": "على",
"horizon.splitscreen.setup.off": "إيقاف",
"horizon.splitscreen.setup.player": "اللاعب %s",
"horizon.splitscreen.setup.revert": "العودة",
"horizon.splitscreen.setup.apply": "تطبيق",
"horizon.splitscreen.setup.warning.empty_main": "لا أحد يلعب في النافذة 1: إنه يخفي",
"horizon.splitscreen.setup.warning.empty_close": "لا أحد يلعب في النافذة %s: يتم إغلاقها عند تطبيق",
"horizon.splitscreen.setup.warning.empty_new": "لا أحد يلعب في النافذة %s: لن يتم فتحها",
"horizon.splitscreen.setup.warning.on_main": "النافذة %s تملأ شاشة النافذة 1: يلعب لاعبوها في النافذة 1",
"horizon.splitscreen.setup.warning.unplugged": "شاشة النافذة %s غير متصلة: يتم تشغيل مشغلاتها في النافذة 1",
"horizon.splitscreen.setup.status.off": "تقسيم الشاشة معطل.",
"horizon.splitscreen.setup.status.enable_hint": "قم بتشغيله، ثم اضغط على زر على وحدة تحكم أخرى في العالم.",
"horizon.splitscreen.setup.status.join_hint": "اضغط على A للانضمام واختيار ملف التعريف.",
"horizon.splitscreen.setup.status.idle": "تقسيم الشاشة خاملاً",
"horizon.splitscreen.setup.status.alone": "لا يوجد لاعبين محليين آخرين.",
"horizon.splitscreen.setup.status.solo_controls": "لم تتغير عناصر التحكم الفردية وملاحظات وحدة التحكم.",
"horizon.splitscreen.setup.window_empty": "النافذة %s: فارغة",
"horizon.splitscreen.setup.note.select": "انقر فوق أحد اللاعبين، أو اسحبه إلى نافذة أو شاشة.",
"horizon.splitscreen.setup.note.apply": "تقدم للعب بهذه الطريقة، ثم ارجع للتراجع.",
"horizon.splitscreen.setup.note.place": "أين يجب أن يلعب %s؟",
"horizon.splitscreen.setup.this_player": "هذا اللاعب",
"horizon.splitscreen.setup.switch_disabled": "يتم إيقاف تشغيل الشاشة المنقسمة بمجرد مغادرة الآخرين (قائمة الإيقاف المؤقت الخاصة بهم).",
"horizon.splitscreen.setup.window_place": "النافذة %s (%s من %s)",
"horizon.splitscreen.setup.names": "الأسماء",
"horizon.splitscreen.setup.identify": "تحديد",
"horizon.splitscreen.setup.layout.two": "2 المشاركة: %s",
"horizon.splitscreen.setup.layout.three": "3 المشاركة: %s",
"horizon.splitscreen.setup.layout.two.0": "تلقائي",
"horizon.splitscreen.setup.layout.two.1": "جنبا إلى جنب",
"horizon.splitscreen.setup.layout.two.2": "أعلى وأسفل",
"horizon.splitscreen.setup.layout.three.0": "واحدة واسعة في الأعلى",
"horizon.splitscreen.setup.layout.three.1": "واحد طويل القامة على اليسار",
"horizon.splitscreen.setup.layout.three.2": "جنبا إلى جنب",
"horizon.splitscreen.setup.help.player": "انقر أو اسحب %s لتحريكها.",
"horizon.splitscreen.setup.help.layout_auto": "%s (جنبًا إلى جنب عندما تكون النافذة واسعة). اضغط للتغيير.",
"horizon.splitscreen.setup.help.layout": "%s. اضغط للتغيير.",
"horizon.splitscreen.setup.help.switch": "تقسيم الشاشة لهذا الكمبيوتر، أو إيقاف تشغيله.",
"horizon.splitscreen.setup.help.identify": "تُظهر طريقة عرض كل لاعب النافذة التي يوجد بها.",
"horizon.splitscreen.setup.help.names": "اسم كل لاعب في زاوية رؤيته.",
"horizon.splitscreen.setup.help.revert": "التراجع عن التغييرات التي لم يتم تطبيقها بعد.",
"horizon.splitscreen.setup.help.apply": "العب بالطريقة التي تظهر بها الخريطة.",
"horizon.splitscreen.setup.help.unchanged": "لم يتغير شيء بعد.",
"horizon.splitscreen.setup.give_up_pad": "التخلي عن الوسادة",
"horizon.splitscreen.prompt.controller_connected": "وحدة التحكم متصلة",
"horizon.splitscreen.prompt.controller_disconnected": "وحدة التحكم مفصولة",
"horizon.splitscreen.prompt.controller_disconnected.hint": "أعد توصيله، أو اضغط على زر على آخر",
"horizon.splitscreen.prompt.join.one": "%s يريد الانضمام",
"horizon.splitscreen.prompt.join.many": "%s وحدات التحكم تريد الانضمام",
"horizon.splitscreen.prompt.join.yes": "انضم",
"horizon.splitscreen.prompt.join.as_p1": "العب بشخصية P1",
"horizon.splitscreen.prompt.join.no": "لا",
"horizon.splitscreen.prompt.lost": "%s: تم فصل وحدة التحكم",
"horizon.splitscreen.prompt.lost.use_another": "استخدم آخر",
"horizon.splitscreen.prompt.lost.leave": "غادر",
"horizon.splitscreen.setup.help.give_up_pad": "تتوقف وحدة التحكم الخاصة بك عن قيادتك ويُعرض عليك الانضمام (أ).",
"horizon.splitscreen.setup.note.held_at": "%s إلى %s: يسقطها A هنا، ويعيدها B.",
"horizon.splitscreen.setup.note.held": "%s تم الالتقاط: يسار/يمين يختار المكان، يسقط A، ويعيده B.",
"Hides models behind opaque blocks. Async checks off-thread; entities tick.": "يخفي النماذج خلف الكتل المعتمة. غير متزامن يتحقق من خارج الموضوع؛ علامة الكيانات.",
"Block Entities": "حظر الكيانات",
"Shulker Boxes": "صناديق شوكر",
"Reuses settled boxes; lid movement stays animated.": "إعادة استخدام الصناديق المستقرة؛ تبقى حركة الغطاء متحركة.",
"Signs": "علامات",
"Reuses sign text until text, light, or font changes.": "يعيد استخدام نص التوقيع حتى يتغير النص أو الضوء أو الخط.",
"Decorated Pots": "الأواني المزخرفة",
"Reuses still pots; break wobble and sherd changes redraw.": "إعادة استخدام الأواني الثابتة؛ كسر تمايل وتغييرات الكسر إعادة رسم.",
"Bells": "أجراس",
"Reuses still bells; ringing stays animated.": "إعادة استخدام الأجراس الثابتة؛ يبقى الرنين متحركًا.",
"Chests": "الصناديق",
"Reuses closed chests; moving lids stay animated.": "إعادة استخدام الصناديق المغلقة؛ الأغطية المتحركة تبقى متحركة.",
"Banners": "لافتات",
"Reuses poles; flags and pattern layers still update.": "إعادة استخدام الأعمدة؛ لا يزال يتم تحديث الأعلام وطبقات الأنماط.",
"Copper Golem Statues": "تماثيل النحاس جوليم",
"Reuses statue geometry until its block state changes.": "يعيد استخدام هندسة التمثال حتى تتغير حالة الكتلة الخاصة به.",
"Leaf Culling": "إعدام الأوراق",
"Every leaf face. Vanilla's fancy leaves.": "وجه كل ورقة. أوراق الفانيليا الفاخرة.",
"Distant Plant Dither": "ثبات النبات البعيد",
"Keeps fine plants in high-res packs from fading far away.": "يحافظ على النباتات الجميلة في عبوات عالية الدقة من البهتان بعيدًا.",
"Screenshot Quality": "جودة لقطة الشاشة",
"F2 screenshots at this many times the game's resolution. Higher takes longer.": "لقطات شاشة F2 بهذا دقة اللعبة عدة مرات. أعلى يستغرق وقتا أطول.",
"Frame Generation": "جيل الإطار",
"Shows a made-up frame between each two real ones: smoother, a little more lag.": "يُظهر إطارًا مكوّنًا بين كل إطارين حقيقيين: أكثر سلاسة وتأخرًا قليلًا.",
"Shadow Cache": "ذاكرة التخزين المؤقت الظل",
"Reuses the pack shadow map when sun, view and world match. Off by default.": "يعيد استخدام خريطة ظل الحزمة عندما تتطابق الشمس والعرض والعالم. إيقاف بشكل افتراضي.",
"Find BlueMap": "ابحث عن بلو ماب",
"On servers, finds their BlueMap web map for far terrain. Next join.": "على الخوادم، يتم العثور على خريطة الويب BlueMap الخاصة بهم للتضاريس البعيدة. الانضمام التالي.",
"BlueMap Radius": "نصف قطر الخريطة الزرقاء",
"How far around you BlueMap tiles are downloaded. Next join.": "إلى أي مدى يتم تنزيل بلاط BlueMap من حولك. الانضمام التالي.",
"Synchronous": "متزامن",
"Asynchronous": "غير متزامن",
"Solid": "صلب",
"Solid Aggressive": "العدوانية الصلبة",
"Hollow": "جوفاء",
"Leaves fully inside a canopy draw solid: fewer see-through layers.": "يتم رسم الأوراق بالكامل داخل المظلة بشكل صلب: طبقات شفافة أقل.",
"Leaves with one open side draw solid too: faster, chunkier edges.": "الأوراق ذات جانب واحد مفتوح ترسم بشكل صلب أيضًا: حواف أسرع وأكثر كثافة.",
"Drops faces between leaves: faster, but gaps look through.": "يسقط الوجوه بين الأوراق: بشكل أسرع، لكن الفجوات تبدو من خلالها.",
"Hotbar: Previous Slot": "Hotbar: الفتحة السابقة",
"Hotbar: Next Slot": "Hotbar: الفتحة التالية",
"horizon.agent.connected.one": "متصل: اتصال وكيل واحد",
"horizon.agent.connected.many": "متصل: %s اتصالات الوكيل",
"horizon.agent.connected.one_ago": "متصل: اتصال وكيل واحد، آخر أمر %s مضت",
"horizon.agent.connected.many_ago": "متصل: %s اتصالات الوكيل، آخر أمر %s مضت",
"horizon.agent.waiting": "في انتظار وكيل.",
"horizon.agent.off": "إيقاف: لا يمكن للعملاء الوصول إلى هذه اللعبة.",
"horizon.agent.session_opened": "تم فتحه لهذه الجلسة بواسطة البرنامج الذي بدأ اللعبة.",
"horizon.agent.socket": "المقبس: %s (انسخ التفاصيل لمساره الكامل)",
"horizon.agent.local_only": "محلي فقط: الوكلاء على هذا الكمبيوتر، وليس الشبكة أبدًا.",
"%s nits": "%s القمل",
"Auto (%s nits)": "تلقائي (%s شمعة في المتر المربع)",
"%.2f nits": "%.2f القمل",
"Hides models behind opaque blocks. Entities update. Off with custom packs.": "يخفي النماذج خلف الكتل المعتمة. تحديث الكيانات مع حزم مخصصة.",
"horizon.extras.repro_keys": "تسجيل الاختصارات",
"horizon.extras.repro_keys.tooltip": "يقوم F3+R ببدء التسجيل النسخي أو إيقافه ويقوم F3+E بكتابة الحزمة الخاصة به. متوقف بشكل افتراضي: تسجيل ينسخ العالم.",
"horizon.agent.record_session": "ابدأ جلسة التسجيل",
"horizon.agent.record_stop": "إيقاف جلسة التسجيل",
"horizon.agent.export_repro": "تصدير حزمة النسخ المتماثل",
"horizon.repro.started": "بدأ التسجيل؛ F3+R يوقفه ويكتب الحزمة.",
"horizon.repro.stopped": "توقف التسجيل: %s",
"horizon.repro.bundle": "حزمة النسخ: %s",
"horizon.repro.error": "استنساخ: %s",
"horizon.repro.no_recording": "لا يوجد تسجيل للتصدير حتى الآن.",
"horizon.repro.replay_started": "بدأت إعادة التشغيل: %s",
"horizon.pack.addInfo": "إضافة حزمة موارد من Modrinth",
"horizon.pack.addWorking": "يسأل مودرنث...",
"horizon.pack.addNone": "لم يتم العثور على حزم الموارد",
"horizon.pack.addTitle": "أضف حزمة الموارد",
"horizon.pack.install": "تثبيت",
"horizon.pack.installing": "التثبيت",
"horizon.pack.installed": "تم التثبيت",
"horizon.pack.search": "بحث",
"horizon.pack.searchHint": "بحث مودرينث...",
"horizon.pack.filters": "المرشحات",
"horizon.pack.filter.realistic": "واقعية",
"horizon.pack.filter.simplistic": "تبسيط",
"horizon.pack.filter.vanillaLike": "تشبه الفانيليا",
"horizon.pack.addFailed": "لا يمكن إضافة الحزمة: %s",
"horizon.extras.header.cosmetics": "مستحضرات التجميل",
"horizon.extras.cosmetics_mine": "مستحضرات التجميل الخاصة بي",
"horizon.extras.cosmetics_mine.tooltip": "مخفي: يراك كل لاعب في Horizon بدون مستحضرات التجميل الخاصة بك، بما في ذلك أنت. نفس مفتاح خزانة المشغل.",
"horizon.extras.cosmetics_others": "مستحضرات التجميل للاعبين الآخرين",
"horizon.extras.cosmetics_others.tooltip": "ما يرتديه لاعبو Horizon الآخرون: كل شيء، فقط أنماط بطاقة الاسم الخاصة بهم، أو لا شيء. مخفيًا، اللعبة لا تسأل أبدًا عما يرتدونه.",
"horizon.extras.cosmetics_auras": "هالات ومسارات الآخرين",
"horizon.extras.cosmetics_auras.tooltip": "الهالات والمسارات التي يرتديها اللاعبون الآخرون. إيقاف بشكل افتراضي.",
"horizon.extras.cosmetics.shown": "معروض",
"horizon.extras.cosmetics.hidden": "مخفي",
"horizon.extras.cosmetics.name_tags": "علامات الاسم فقط"
}
@@ -0,0 +1,463 @@
{
"horizon.options.controller": "Ovladač",
"horizon.options.vibration": "Vibrace",
"horizon.options.adaptive_triggers": "Adaptivní spouštěče",
"horizon.options.lightbar": "Světelná lišta",
"horizon.options.look_sensitivity": "Citlivost pohledu",
"horizon.options.invert_x": "Invertovat pohled X",
"horizon.options.invert_y": "Invertovat pohled Y",
"horizon.options.sneak_button": "Tlačítko plížení",
"horizon.options.move_deadzone": "Mrtvá zóna pohybu",
"horizon.options.look_deadzone": "Mrtvá zóna pohledu",
"horizon.options.button_glyphs": "Glyfy tlačítek",
"horizon.options.menu_navigation": "Navigace v menu",
"horizon.options.on_screen_keyboard": "Klávesnice na obrazovce",
"horizon.options.chat_delay": "Zpoždění chatu",
"horizon.options.lightbar.health": "Zdraví",
"horizon.options.lightbar.dimension": "Dimenze",
"horizon.options.menu_focus": "Zaměřte se",
"horizon.options.menu_pointer": "Ukazatel",
"horizon.options.keyboard.horizon": "Horizont",
"horizon.options.keyboard.steam": "Pára",
"horizon.options.unavailable": "Tato funkce zatím není v Horizon k dispozici.",
"horizon.options.search": "Nastavení vyhledávání...",
"horizon.pages.shader_packs": "Shader Pack",
"horizon.pages.shader_options": "Možnosti stínování",
"horizon.pages.controller": "Nastavení ovladače",
"horizon.pages.settings": "Nastavení Horizonu",
"horizon.pages.agent": "Agent AI",
"horizon.split.leave": "Odejděte",
"horizon.pages.split_settings": "Nastavení rozdělené obrazovky",
"horizon.pages.split_profiles": "kdo hraje?",
"horizon.pages.split_setup": "Nastavení rozdělené obrazovky",
"horizon.pages.music": "Hudba",
"horizon.pages.music.creative": "Kreativní",
"horizon.pages.music.underwater": "Pod vodou",
"horizon.pages.music.end": "Konec",
"horizon.pages.music.boss": "šéfe",
"horizon.pages.music.credits": "Kredity",
"horizon.pages.music.overworld_biomes": "Nadsvětové biomy",
"horizon.pages.music.nether_biomes": "Nether biomy",
"horizon.pages.music.end_biomes": "Ukončete biomy",
"horizon.pages.music.other": "Jiná hudba",
"horizon.pages.music.empty": "Žádné hudební stopy: zvuky hry se nenačtou.",
"horizon.pages.music.tooltip": "Vestavěné stopy podle situace: zahrajte si jednu hned, nebo kteroukoli vypněte, aby ji hra přestala vybírat.",
"horizon.pages.settings.tooltip": "Vlastní nastavení Horizon: grafika, ovladače, doplňky a mody.",
"horizon.pages.graphics.tooltip": "Grafika, jednoduše: každé nastavení říká, kolik to stojí.",
"horizon.pages.graphics_advanced.tooltip": "Každé grafické nastavení, včetně Horizon, s tím, co každé stojí.",
"horizon.pages.controller.tooltip": "Ovladače: jejich tlačítka, páčky, vibrace a navigace v menu.",
"horizon.pages.extras.tooltip": "Volitelné doplňky, všechny ve výchozím nastavení vypnuté: hra zůstane vanilková, dokud jeden nezapnete.",
"horizon.pages.agent.tooltip": "Nechte hrát svého vlastního agenta AI: klienty horizon-ctl a MCP na tomto počítači.",
"horizon.pages.split_profiles.tooltip": "Kdo hraje: profil uložený v této složce hry.",
"horizon.pages.split_setup.tooltip": "Okna a monitory a kdo kde hraje.",
"horizon.pages.shader_packs.tooltip": "Shader packy ze složky shaderpacks: vlastní Horizon a ty ve formátu shaders/. Jeden běží najednou.",
"horizon.pages.mods.tooltip": "Mody vytvořené pro Horizon ze složky horizon-mods. Každá běží v pískovišti a zůstane vypnutá, dokud ji nezapnete.",
"horizon.pages.open.graphics": "grafika...",
"horizon.pages.open.graphics_advanced": "Pokročilá grafika...",
"horizon.pages.open.shader_packs": "Shader Pack...",
"horizon.pages.open.controller": "Nastavení ovladače...",
"horizon.pages.open.split_setup": "Rozdělená obrazovka...",
"horizon.pages.open.extras": "Extra...",
"horizon.pages.open.mods": "Modifikace...",
"horizon.pages.open.agent": "AI agent...",
"horizon.pages.open.controller_binds": "Ovladač se váže...",
"horizon.pages.open.horizon_settings": "Nastavení Horizonu...",
"horizon.pages.open.music": "hudba...",
"horizon.mods.empty": "Žádné mody: vložte soubory .hmod do složky horizon-mods",
"horizon.mods.stopped": " (Zastaveno)",
"horizon.mods.not_built": " (Nepostaveno)",
"horizon.mods.dev": " (vývoj)",
"horizon.mods.settings": "Nastavení",
"horizon.mods.in_world": " (nechat svět změnit)",
"horizon.mods.open_folder": "Otevřete složku Mod",
"horizon.shader_packs.empty": "Žádné balíčky shaderů: vložte je do složky shaderpacks",
"horizon.shader_packs.kind_horizon": " (Horizont)",
"horizon.shader_options.open": "Možnosti stínování...",
"horizon.shader_options.profile": "Profil",
"horizon.shader_options.loading": "Čtení možností sady shaderů...",
"horizon.agent.copy_details": "Kopírovat podrobnosti o připojení",
"horizon.multiplayer.join": "Připojte se",
"horizon.multiplayer.cancel_reconnecting": "Zrušit opětovné připojení",
"horizon.multiplayer.join_friend": "Přidejte se k příteli",
"horizon.multiplayer.invite_code": "Kód pozvánky",
"horizon.multiplayer.relay": "relé (volitelné)",
"Preset": "Přednastaveno",
"LOD Distance": "LOD Vzdálenost",
"Far Detail": "Daleký detail",
"Entity Culling": "Vyřazení entit",
"Chunk Updates": "Aktualizace bloků",
"Upload Budget": "Nahrát rozpočet",
"Sky": "nebe",
"Fog": "mlha",
"Weather": "Počasí",
"Animated Textures": "Animované textury",
"Present Mode": "Současný režim",
"Worker Threads": "Pracovní vlákna",
"Resolution Scale": "Měřítko rozlišení",
"Paper White": "Bílý papír",
"Peak Brightness": "Špičkový jas",
"Black Level": "Úroveň černé",
"UI Brightness": "Jas uživatelského rozhraní",
"Battery Mode": "Režim baterie",
"Graphics API": "Grafické rozhraní API",
"Translucent Batching": "Průsvitné dávkování",
"Performance Overlay": "Překryvný výkon",
"Full Detail Distance": "Úplná podrobná vzdálenost",
"On": "Zapnuto",
"Off": "Vypnuto",
"Unlimited": "Neomezené",
"Custom": "Vlastní",
"Performance": "Výkon",
"Balanced": "Vyvážený",
"Quality": "Kvalita",
"Ultra Performance": "Ultra výkon",
"Native": "Nativní",
"Full": "Plný",
"Reduced": "Snížená",
"Efficient": "Efektivní",
"Precise": "Přesný",
"Mailbox": "Poštovní schránka",
"Immediate": "Okamžitě",
"FPS and Graph": "FPS a graf",
"No cost": "Žádné náklady",
"Low cost": "Nízká cena",
"Medium cost": "Střední náklady",
"High cost": "Vysoká cena",
"Saves time": "Šetří čas",
"Graphics": "Grafika",
"Done": "Hotovo",
"This feature is not yet available in Horizon.": "Tato funkce zatím není v Horizon k dispozici.",
"Your display or system doesn't offer HDR output.": "Váš displej nebo systém nenabízí výstup HDR.",
"Turn HDR on to use it.": "Chcete-li jej používat, zapněte HDR.",
"Your GPU or graphics API doesn't support it.": "Vaše GPU nebo grafické rozhraní API to nepodporuje.",
"%s chunks": "%s kousky",
"%s per frame": "%s na snímek",
"%s MiB/frame": "%s MiB/snímek",
"%s KiB/frame": "%s KiB/snímek",
"Full-detail terrain range. LOD Distance can extend local worlds farther.": "Úplný rozsah terénu. LOD Distance může rozšířit místní světy dále.",
"Coarse distant terrain in local worlds. Integrated GPUs stop at 128 chunks.": "Hrubý vzdálený terén v místních světech. Integrované GPU se zastaví na 128 blocích.",
"Reduced draws far terrain coarser: faster on this integrated GPU.": "Snížené vykreslování daleko hrubšího terénu: rychlejší na tomto integrovaném GPU.",
"Reduced draws far terrain coarser, for GPUs it slows down.": "Snížené vykresluje daleko hrubší terén, u GPU se zpomaluje.",
"Field of view. Wider shows more terrain at once.": "Zorné pole. Širší zobrazuje více terénu najednou.",
"Caps frames per second; a cap saves power and heat.": "Počet snímků za sekundu; čepice šetří energii a teplo.",
"Waits for the display's refresh: no tearing, a little latency.": "Čeká na obnovení displeje: žádné trhání, malá latence.",
"Size of menus and the HUD.": "Velikost menu a HUD.",
"Sets the options below together. Changing one makes it Custom.": "Nastaví společně níže uvedené možnosti. Změnou jednoho se stane vlastní.",
"Lava, fire and sunlight shine brighter than white. Needs an HDR display.": "Láva, oheň a sluneční světlo září jasněji než bílé. Vyžaduje HDR displej.",
"Your display's darkest black. 0 for OLED; LCDs glow a little.": "Váš displej je nejtmavší černý. 0 pro OLED; LCD trochu svítí.",
"How bright highlights get. Auto: the peak your system reports.": "Jak se získá jasný melír. Auto: vrchol, který váš systém hlásí.",
"How bright white paper and menus look. Auto: your desktop's white.": "Jak vypadají zářivě bílé papíry a nabídky. Auto: vaše plocha je bílá.",
"How bright the HUD and menus are, against paper white.": "Jak jasný je HUD a nabídky oproti bílé na papíře.",
"How far mobs, crops and machines keep working. CPU time.": "Jak dalece davy, plodiny a stroje fungují. CPU čas.",
"How far away mobs and items are drawn, as a share of normal.": "Jak daleko jsou mobové a předměty nakresleny jako podíl normálu.",
"Skips terrain hidden behind closed sections. Off costs a lot.": "Přeskočí terén skrytý za uzavřenými úseky. Vypnutí stojí hodně.",
"Hides entities behind opaque blocks.": "Skryje entity za neprůhlednými bloky.",
"No entity occlusion culling.": "Žádné vyřazení okluze entity.",
"CPU occlusion test runs this frame.": "Test okluze CPU spustí tento rámec.",
"Occlusion checks run on a worker thread.": "Kontroly okluze běží na pracovním vláknu.",
"Meshed sections uploaded per frame. Lower is smoother while loading.": "Síťované sekce nahrané na snímek. Nižší je při načítání hladší.",
"Soft shadows in corners. Costs chunk building time only.": "Jemné stíny v rozích. Stojí jen kus času výstavby.",
"Smaller copies of block textures for distant terrain: less shimmer.": "Menší kopie textur bloků pro vzdálený terén: méně třpytu.",
"Blends grass and water colours across biomes when building chunks.": "Při stavbě kousků mísí barvy trávy a vody napříč biomy.",
"Cloud layer: off, flat (fast) or 3D (fancy).": "Cloudová vrstva: vypnutá, plochá (rychlá) nebo 3D (efektní).",
"How far clouds reach, in chunks.": "Jak daleko dosahují mraky, v kouscích.",
"Draws the sky, sun, moon and stars.": "Kreslí oblohu, slunce, měsíc a hvězdy.",
"Distance fog. Off shows the edge of the loaded world.": "Vzdálená mlha. Vypnuto ukazuje okraj načteného světa.",
"Draws rain and snow.": "Přitahuje déšť a sníh.",
"How far rain and snow fall around you.": "Jak daleko kolem vás padá déšť a sníh.",
"How many particles effects spawn.": "Kolik částic se vytvoří.",
"Round shadows under mobs and items.": "Kulaté stíny pod moby a předměty.",
"Leaves with see-through gaps. Off draws them solid.": "Listy s průhlednými mezerami. Off je vykreslí pevně.",
"Sorts water and glass more exactly behind each other.": "Třídí vodu a sklo přesněji za sebou.",
"Which chunk rebuilds wait for the frame: none, nearby or yours.": "Který kus přestavby čeká na rám: žádný, poblíž nebo váš.",
"Animates water, lava, fire and other moving textures.": "Animuje vodu, lávu, oheň a další pohyblivé textury.",
"World pixels per screen pixel. Below 100% is faster on the GPU.": "Světové pixely na pixel obrazovky. Pod 100 % je rychlejší na GPU.",
"Smooths jagged edges. FXAA: softer. TAA: smoothest, moving things may trail.": "Vyhlazuje zubaté okraje. FXAA: měkčí. TAA: nejhladší, pohyblivé věci se mohou táhnout.",
"Renders the world smaller and rebuilds it with TAA. Faster, softer.": "Zmenší svět a přestaví ho pomocí TAA. Rychlejší, měkčí.",
"HDR output on an HDR display: lava, fire and sunlight shine brighter.": "Výstup HDR na displeji HDR: láva, oheň a sluneční světlo září jasněji.",
"How frames reach the screen while VSync is off.": "Jak se snímky dostanou na obrazovku, když je VSync vypnutá.",
"Efficient sleeps until the next frame; Precise spins, like vanilla.": "Efektivní režim spánku až do dalšího snímku; Přesná rotace, jako vanilka.",
"Fills the screen (borderless).": "Vyplní obrazovku (bez okrajů).",
"Brightens dark places.": "Rozjasňuje tmavá místa.",
"Lowers the frame rate when minimised, or idle too.": "Při minimalizaci nebo nečinnosti sníží snímkovou frekvenci.",
"Sways the view while walking.": "Při chůzi kývá výhled.",
"Fades newly loaded chunks in.": "Nově načtené kousky zmizí.",
"Darkens the screen's edges.": "Ztmaví okraje obrazovky.",
"Shows when the world saves.": "Ukazuje, kdy svět zachraňuje.",
"Shows attack cooldown.": "Ukazuje cooldown útoku.",
"60 FPS cap (30 in menus or unfocused), half the workers: less power.": "60 snímků za sekundu (30 v nabídkách nebo nezaostřené), polovina pracovníků: méně energie.",
"Threads that generate, light and mesh chunks. Next start.": "Vlákna, která generují, osvětlují a propojují kousky. Další start.",
"Vulkan, then DirectX 12 (Windows) or OpenGL (Linux) where it fails. Next start.": "Vulkan, pak DirectX 12 (Windows) nebo OpenGL (Linux), kde selže. Další start.",
"Water and glass in one buffer: fewer draw calls, a bit more VRAM. Next start.": "Voda a sklo v jedné vyrovnávací paměti: méně remízových volání, o něco více VRAM. Další start.",
"Mesh data sent to the GPU per frame. Lower is smoother while loading.": "Data sítě odesílaná do GPU na snímek. Nižší je při načítání hladší.",
"Frame rate and frame times over the game, with a graph.": "Frekvence snímků a časy snímků během hry s grafem.",
"horizon.multiplayer.finding_friend": "Hledání světa svého přítele...",
"horizon.multiplayer.not_signed_in": "Tento server je v online režimu. Přihlaste se pomocí svého účtu Microsoft ve spouštěči Horizon a připojte se k němu.",
"horizon.multiplayer.invalid_address": "Neplatná adresa serveru: %s",
"horizon.multiplayer.connected_friend_direct": "Přímé spojení s vaším přítelem...",
"horizon.multiplayer.connected_friend_relay": "Připojeno k vašemu příteli přes relé...",
"General": "Generál",
"Advanced": "Pokročilé",
"Undo": "Vrátit zpět",
"Search options": "Možnosti vyhledávání",
"Shortcut": "Zkratka",
"Distance": "Vzdálenost",
"Display": "Displej",
"Interface": "Rozhraní",
"Sky and weather": "Obloha a počasí",
"Lighting and entities": "Osvětlení a entity",
"Textures": "Textury",
"Image": "Obrázek",
"Chunk loading": "Načítání kusů",
"Culling": "Porážení",
"Power": "Moc",
"Frames": "Rámečky",
"Overlay": "Překryvná vrstva",
"Output": "Výstup",
"Brightness": "Jas",
"How far you see, the window and the HUD.": "Jak daleko vidíte, okno a HUD.",
"The sky and weather, lighting, textures and the image.": "Obloha a počasí, osvětlení, textury a obraz.",
"Chunk loading, culling and power use.": "Nakládání, utracení a spotřeba energie.",
"How frames reach the screen, and the performance overlay.": "Jak se snímky dostanou na obrazovku a překryvný výkon.",
"Brighter-than-white output on an HDR display.": "Výstup jasnější než bílý na displeji HDR.",
"Results for \"%s\"": "Výsledky pro „%s“",
"No settings match.": "Žádné nastavení neodpovídá.",
"horizon.title.not_affiliated": "Není spojen s Mojang nebo Microsoft",
"horizon.extras.header.lighting": "Osvětlení",
"horizon.extras.header.third_person": "Třetí osoba",
"horizon.extras.header.particles": "Částice",
"horizon.extras.header.inventory": "Inventář",
"horizon.extras.header.sound": "Zvuk",
"horizon.extras.header.menus": "Menu",
"horizon.extras.dynamic_lights": "Dynamická světla",
"horizon.extras.own_name_tag": "Vlastní jmenovka",
"horizon.extras.hide_block_particles": "Skryjte částice pro rozbití bloku",
"horizon.extras.auto_reconnect": "Automatické opětovné připojení",
"horizon.extras.ui_sound_reserve": "Ponechat kanály pro zvuky uživatelského rozhraní",
"horizon.extras.music_page": "Hudební stránka",
"horizon.extras.mouse_tweaks": "Ovládání myši Tweaks",
"horizon.extras.mouse_tweaks_wheel": "Rolovací kolečko posouvá položky",
"horizon.extras.sort": "Tlačítka řazení",
"horizon.extras.sort_key": "Klíč řazení",
"horizon.extras.no_ai": "Žádná umělá inteligence",
"horizon.extras.agent_control": "Kontrola agentů",
"horizon.extras.discord_presence": "Neshoda bohatá přítomnost",
"horizon.extras.chat_animation": "Hladký chat",
"horizon.extras.chat_indicator": "Indikátor zprávy",
"horizon.extras.wheel_cycles_settings": "Rolovací kolečko mění nastavení",
"horizon.extras.pack_browser": "Prohlížeč balíčku zdrojů",
"horizon.extras.fullbright.tooltip": "Ukažte bloky a entity při plném osvětlení, dokonce i v tmavých oblastech.",
"horizon.extras.dynamic_lights.tooltip": "Pochodně a jiné světelné zdroje držené, shozené nebo v plamenech osvětlují bloky kolem nich.",
"horizon.extras.own_name_tag.tooltip": "Zobrazuje vaše jméno nad vaší hlavou ve třetí osobě, jak to vidí ostatní hráči. Skryté, když server skryje jména vašeho týmu nebo jste neviditelní.",
"horizon.extras.hide_block_particles.tooltip": "Skryje částečky trosek, které prasknou z rozbitého bloku a rozpadnou se z toho, který vytěžíte. Ostatní částice zůstávají.",
"horizon.extras.auto_reconnect.tooltip": "Znovu se připojí k serveru po ztrátě připojení nebo restartu, nikdy po kopu nebo banu.",
"horizon.extras.ui_sound_reserve.tooltip": "Zvuky na světě nechávají 16 z 247 zvukových kanálů volných, takže jejich záplava (velká exploze) nemůže umlčet kliknutí na nabídku.",
"horizon.extras.music_page.tooltip": "Music & Sounds dostane stránku Hudba...: přehrajte libovolnou vestavěnou stopu hned, nebo jednu vypněte, aby ji hra přestala vybírat. Nic se nezmění, dokud stopu nevypnete.",
"horizon.extras.mouse_tweaks.tooltip": "Tažením doprava umístíte jednu na každý slot, tažením doleva shromažďujete zadržený předmět, Shift + tažením doleva posunete každý slot.",
"horizon.extras.mouse_tweaks_wheel.tooltip": "Dolů pošle jednu položku slotu na druhou stranu, nahoru jednu vrátí zpět.",
"horizon.extras.sort.tooltip": "Třídí inventář, truhly, sudy, ender truhly a shulker boxy v kreativním pořadí karet a slučuje hromádky.",
"horizon.extras.sort_key.tooltip": "Seřadí část pod kurzorem. Klikněte a poté stiskněte klávesu; Escape to rozváže.",
"horizon.extras.no_ai.tooltip": "Skryje a vypne všechny funkce AI: ovládání agenta, horizon-ctl a servery MCP. Vypínač spouštěče také.",
"horizon.extras.agent_control.tooltip": "Váš vlastní AI agent může hrát tuto hru prostřednictvím horizon-ctl nebo klienta MCP pouze na tomto počítači.",
"horizon.extras.discord_presence.tooltip": "Zobrazuje Playing Horizon na vašem Discord profilu, zatímco Discord běží: nabídky, single player nebo multiplayer, dimenze a hraný čas. Nikdy jméno světa nebo adresa serveru.",
"Calibrate...": "Kalibrovat...",
"Calibrate Anyway...": "Přesto kalibrovat...",
"Use Automatic Setup": "Použijte Automatické nastavení",
"Shortcut: %s": "Zkratka: %s",
"Next": "Další",
"HDR Calibration %s/%s: %s": "Kalibrace HDR %s/%s: %s",
"Sets the three below full screen, one test picture at a time.": "Nastaví tři pod celou obrazovkou, vždy jeden testovací obrázek.",
"A key that opens this screen from the game. Not bound at first.": "Klíč, který otevře tuto obrazovku ze hry. Zpočátku bez vazby.",
"Your display didn't say how bright it gets: calibrate to set it up.": "Váš displej neříkal, jak jasný je: zkalibrujte jej, abyste jej nastavili.",
"Already set up for your display. Only calibrate if HDR looks wrong.": "Již nastaveno pro váš displej. Kalibrujte pouze v případě, že HDR vypadá špatně.",
"Puts Peak Brightness and Paper White back to your display's setup.": "Vrátí maximální jas a papírovou bílou zpět do nastavení vašeho displeje.",
"Set up for your display. Leave on Auto unless it looks wrong.": "Nastavte pro svůj displej. Nechte na Auto, pokud to nevypadá špatně.",
"Lower it until the logo just disappears into the black.": "Snižte jej, dokud logo nezmizí v černé barvě.",
"Raise it until the logo just disappears into the bright square.": "Zvedněte jej, dokud logo nezmizí ve světlém čtverci.",
"Make the card a white that's comfortable to look at for a long time, in the light you play in.": "Udělejte z karty bílou, na kterou se budete pohodlně dívat po dlouhou dobu ve světle, ve kterém hrajete.",
"horizon.splitscreen.profiles.forget": "Zapomeňte",
"horizon.splitscreen.profiles.create": "Vytvořit",
"horizon.splitscreen.profiles.you": " - vy",
"horizon.splitscreen.profiles.forget_named": "Zapomenout %s",
"horizon.splitscreen.profiles.previous": "Předchozí",
"horizon.splitscreen.profiles.next": "Další",
"horizon.splitscreen.profiles.new_button": "Nový profil...",
"horizon.splitscreen.profiles.forget_title": "Zapomenout profil?",
"horizon.splitscreen.profiles.forget_leaves": "Opustí seznam této instance.",
"horizon.splitscreen.profiles.forget_kept": "Světový pokrok a nastavení jsou zachovány.",
"horizon.splitscreen.profiles.new_title": "Nový profil",
"horizon.splitscreen.profiles.name_hint": "Jméno (3 až 16 písmen, číslic, _)",
"horizon.splitscreen.profiles.switch_title": "Přepnout profil",
"horizon.splitscreen.profiles.offline_note": "Offline profily patří k této instanci",
"horizon.splitscreen.profiles.move": "Pohybujte se tam, kde hrajete",
"horizon.splitscreen.profiles.move_place": "Přesuňte se, kde hrajete: %s",
"horizon.friends.title": "Hrajte s přáteli",
"horizon.friends.hint": "Přátelé vloží kód za tlačítko Přátelé na titulní obrazovce, do Přímého připojení nebo na stránku Play spouštěče.",
"horizon.friends.copied": "Zkopírováno",
"horizon.friends.copy_code": "Kopírovat kód",
"horizon.friends.stop_sharing": "Přestat sdílet",
"horizon.friends.none_yet": "Zatím tu nejsou žádní přátelé.",
"horizon.friends.here_now": "Tady teď: %s",
"horizon.friends.share_intro": "Sdílejte tento svět pomocí zvacího kódu: otevře se na LAN a přátelé na internetu se připojí pomocí kódu. Není zapojen žádný náš server.",
"horizon.friends.start_sharing": "Začněte sdílet",
"horizon.friends.troubleshooting": "Odstraňování problémů...",
"horizon.friends.stopped": "Sdílení kódu pozvánky bylo zastaveno.",
"horizon.friends.short_code_changed": "Někdo neustále zkoušel špatný krátký kód, takže se to změnilo.",
"horizon.friends.wrong_code": "Někdo zkusil špatný kód.",
"horizon.friends.code_ready": "Váš zvací kód je připraven: Herní menu, Hrajte s přáteli. Zkopírujte jej a pošlete svým přátelům.",
"horizon.friends.share_failed": "Nepodařilo se sdílet svět: %s",
"horizon.friends.finding_route": "Zjištění, jak vás mohou přátelé kontaktovat…",
"horizon.osk.space": "Prostor",
"horizon.osk.delete": "Smazat",
"horizon.osk.type": "Typ",
"horizon.osk.symbols": "Symboly",
"horizon.osk.close": "Zavřít",
"horizon.extras.chat_animation.tooltip": "Nová čára chatu se vsune zleva, zatímco se mizí, místo aby vypadala celá.",
"horizon.extras.chat_indicator.tooltip": "Barevný pruh nalevo od chatovací linky.",
"horizon.extras.wheel_cycles_settings.tooltip": "Rolovací kolečko nad tlačítkem v nastavení mění jeho hodnotu, jako u vanilky. Vypnuto, kolečko pouze posouvá seznam.",
"horizon.extras.pack_browser.tooltip": "Select Resource Packs dostane tlačítko Přidat, které prohledá Modrinth a nainstaluje balíček do vaší složky balíčků. Vypnuto, hra nikdy nekontaktuje Modrinth.",
"horizon.extras.splitscreen.tooltip": "Ve světě se může jako nový hráč připojit další ovladač: stiskněte A, když se zeptá, pak vyberte profil a kde hrát.",
"horizon.splitscreen.setup.monitor_unknown": "monitor",
"horizon.splitscreen.setup.window": "okno %s",
"horizon.splitscreen.setup.new_window": "Nové okno",
"horizon.splitscreen.setup.fill_monitor": "Vyplňte %s",
"horizon.splitscreen.setup.done": "Hotovo",
"horizon.splitscreen.setup.on": "Zapnuto",
"horizon.splitscreen.setup.off": "Vypnuto",
"horizon.splitscreen.setup.player": "Hráč %s",
"horizon.splitscreen.setup.revert": "Vrátit zpět",
"horizon.splitscreen.setup.apply": "Použít",
"horizon.splitscreen.setup.warning.empty_main": "V okně 1 nikdo nehraje: skrývá se",
"horizon.splitscreen.setup.warning.empty_close": "V okně %s nikdo nehraje: zavře se při Použít",
"horizon.splitscreen.setup.warning.empty_new": "V okně %s nikdo nehraje: neotevře se",
"horizon.splitscreen.setup.warning.on_main": "Okno %s vyplní monitor okna 1: jeho hráči hrají v okně 1",
"horizon.splitscreen.setup.warning.unplugged": "Monitor okna %s není připojen: jeho hráči hrají v okně 1",
"horizon.splitscreen.setup.status.off": "Splitscreen je vypnutý.",
"horizon.splitscreen.setup.status.enable_hint": "Zapněte jej a poté stiskněte tlačítko na jiném ovladači na světě.",
"horizon.splitscreen.setup.status.join_hint": "Stisknutím tlačítka A se připojíte a vyberete profil.",
"horizon.splitscreen.setup.status.idle": "Splitscreen nečinný",
"horizon.splitscreen.setup.status.alone": "Žádní další místní hráči.",
"horizon.splitscreen.setup.status.solo_controls": "Solo ovládací prvky a zpětná vazba regulátoru se nemění.",
"horizon.splitscreen.setup.window_empty": "Okno %s: prázdné",
"horizon.splitscreen.setup.note.select": "Klikněte na přehrávač nebo jej přetáhněte do okna nebo na monitor.",
"horizon.splitscreen.setup.note.apply": "Použít pro přehrávání tímto způsobem, Vrátit pro vrácení zpět.",
"horizon.splitscreen.setup.note.place": "Kde by měl %s hrát?",
"horizon.splitscreen.setup.this_player": "tohoto hráče",
"horizon.splitscreen.setup.switch_disabled": "Splitscreen se vypne, jakmile ostatní odejdou (jejich nabídka pozastavení).",
"horizon.splitscreen.setup.window_place": "Okno %s (%s z %s)",
"horizon.splitscreen.setup.names": "Jména",
"horizon.splitscreen.setup.identify": "Identifikovat",
"horizon.splitscreen.setup.layout.two": "2 sdílení: %s",
"horizon.splitscreen.setup.layout.three": "3 sdílení: %s",
"horizon.splitscreen.setup.layout.two.1": "Bok po boku",
"horizon.splitscreen.setup.layout.two.2": "Nahoře a dole",
"horizon.splitscreen.setup.layout.three.0": "Jeden široký nahoře",
"horizon.splitscreen.setup.layout.three.1": "Jeden vysoký vlevo",
"horizon.splitscreen.setup.layout.three.2": "Bok po boku",
"horizon.splitscreen.setup.help.player": "Kliknutím nebo přetažením %s je přesunete.",
"horizon.splitscreen.setup.help.layout_auto": "%s (vedle sebe, když je okno široké). Stiskněte pro změnu.",
"horizon.splitscreen.setup.help.layout": "%s. Stiskněte pro změnu.",
"horizon.splitscreen.setup.help.switch": "Rozdělená obrazovka pro tento počítač, zapnutá nebo vypnutá.",
"horizon.splitscreen.setup.help.identify": "Pohled každého hráče ukazuje, ve kterém okně se nachází.",
"horizon.splitscreen.setup.help.names": "Jméno každého hráče v rohu jeho pohledu.",
"horizon.splitscreen.setup.help.revert": "Vraťte zpět změny, které dosud nebyly použity.",
"horizon.splitscreen.setup.help.apply": "Hrajte tak, jak ukazuje mapa.",
"horizon.splitscreen.setup.help.unchanged": "Zatím se nic nezměnilo.",
"horizon.splitscreen.prompt.controller_connected": "Ovladač připojen",
"horizon.splitscreen.prompt.controller_disconnected": "Ovladač odpojen",
"horizon.splitscreen.prompt.controller_disconnected.hint": "Znovu jej připojte nebo stiskněte tlačítko na jiném",
"horizon.splitscreen.prompt.join.one": "%s se chce připojit",
"horizon.splitscreen.prompt.join.many": "%s kontroloři se chtějí připojit",
"horizon.splitscreen.prompt.join.yes": "Připojte se",
"horizon.splitscreen.prompt.join.as_p1": "Hrajte jako P1",
"horizon.splitscreen.prompt.join.no": "ne",
"horizon.splitscreen.prompt.lost": "%s: ovladač odpojen",
"horizon.splitscreen.prompt.lost.use_another": "Použijte jiný",
"horizon.splitscreen.prompt.lost.leave": "Odejděte",
"horizon.splitscreen.setup.help.give_up_pad": "Váš ovladač vás přestane řídit a je mu nabídnuto připojení (A).",
"horizon.splitscreen.setup.note.held_at": "%s až %s: A to sem hodí, B to vrátí.",
"horizon.splitscreen.setup.note.held": "%s zvedl: vlevo/vpravo vybírá tam, kde A spadne, B to vrátí zpět.",
"Hides models behind opaque blocks. Async checks off-thread; entities tick.": "Skryje modely za neprůhledné bloky. Async kontroluje off-thread; entity klíštěte.",
"Block Entities": "Blokovat entity",
"Shulker Boxes": "Krabice Shulker",
"Reuses settled boxes; lid movement stays animated.": "Znovu používá usazené krabice; pohyb víka zůstává animovaný.",
"Signs": "Známky",
"Reuses sign text until text, light, or font changes.": "Znovu používá podepsaný text, dokud se nezmění text, světlo nebo písmo.",
"Decorated Pots": "Zdobené hrnce",
"Reuses still pots; break wobble and sherd changes redraw.": "Znovu používá nehybné hrnce; break wobble and sherd changes redraw.",
"Bells": "Zvony",
"Reuses still bells; ringing stays animated.": "Znovu používá stále zvony; vyzvánění zůstává animované.",
"Chests": "Truhly",
"Reuses closed chests; moving lids stay animated.": "Znovu používá uzavřené truhly; pohyblivá víčka zůstávají animovaná.",
"Banners": "Bannery",
"Reuses poles; flags and pattern layers still update.": "Znovu používá tyče; příznaky a vrstvy vzorů se stále aktualizují.",
"Copper Golem Statues": "Sochy měděných golemů",
"Reuses statue geometry until its block state changes.": "Znovu používá geometrii sochy, dokud se její stav bloku nezmění.",
"Leaf Culling": "Vyřazování listů",
"Every leaf face. Vanilla's fancy leaves.": "Tvář každého listu. Vanilkovy efektní listy.",
"Keeps fine plants in high-res packs from fading far away.": "Chrání jemné rostliny v balíčcích s vysokým rozlišením před vyblednutím.",
"Screenshot Quality": "Kvalita snímku obrazovky",
"F2 screenshots at this many times the game's resolution. Higher takes longer.": "F2 screenshoty v tomto mnohonásobku rozlišení hry. Vyšší trvá déle.",
"Frame Generation": "Generování snímků",
"Shows a made-up frame between each two real ones: smoother, a little more lag.": "Zobrazuje vytvořený rám mezi každým dvěma skutečnými: hladší, trochu více zpoždění.",
"Shadow Cache": "Stínová mezipaměť",
"Reuses the pack shadow map when sun, view and world match. Off by default.": "Znovu použije mapu stínu balíčku, když se slunce, pohled a svět shodují. Ve výchozím nastavení vypnuto.",
"Find BlueMap": "Najděte BlueMap",
"On servers, finds their BlueMap web map for far terrain. Next join.": "Na serverech najde jejich webovou mapu BlueMap pro vzdálený terén. Další připojení.",
"How far around you BlueMap tiles are downloaded. Next join.": "Jak daleko ve vašem okolí jsou staženy dlaždice BlueMap. Další připojení.",
"Synchronous": "Synchronní",
"Asynchronous": "Asynchronní",
"Solid": "Pevné",
"Solid Aggressive": "Solidní agresivní",
"Hollow": "Dutý",
"Leaves fully inside a canopy draw solid: fewer see-through layers.": "Listy plně uvnitř baldachýnu kreslí pevně: méně průhledných vrstev.",
"Leaves with one open side draw solid too: faster, chunkier edges.": "Listy s jednou otevřenou stranou se také kreslí pevně: rychlejší, robustnější okraje.",
"Drops faces between leaves: faster, but gaps look through.": "Klesá obličeje mezi listy: rychlejší, ale prohlížejí mezery.",
"Hotbar: Previous Slot": "Hotbar: Předchozí slot",
"Hotbar: Next Slot": "Hotbar: Další slot",
"horizon.agent.connected.one": "Připojeno: 1 připojení agenta",
"horizon.agent.connected.many": "Připojeno: %s připojení agentů",
"horizon.agent.connected.one_ago": "Připojeno: 1 připojení agenta, poslední příkaz před %s s",
"horizon.agent.connected.many_ago": "Připojeno: %s připojení agentů, poslední příkaz před %s s",
"horizon.agent.waiting": "Čekání na agenta.",
"horizon.agent.off": "Vypnuto: agenti se k této hře nedostanou.",
"horizon.agent.session_opened": "Otevřeno pro tuto relaci programem, který spustil hru.",
"horizon.agent.socket": "Socket: %s (zkopírujte podrobnosti pro jeho úplnou cestu)",
"horizon.agent.local_only": "Pouze místní: agenti na tomto počítači, nikdy v síti.",
"%s nits": "%s hnid",
"%.2f nits": "%.2f hnid",
"Hides models behind opaque blocks. Entities update. Off with custom packs.": "Skryje modely za neprůhledné bloky. Aktualizace entit. Vypnuto s vlastními balíčky.",
"horizon.extras.repro_keys": "Zkratky nahrávání",
"horizon.extras.repro_keys.tooltip": "F3+R spustí nebo zastaví repro záznam a F3+E zapíše jeho svazek. Ve výchozím nastavení vypnuto: nahrávka zkopíruje svět.",
"horizon.agent.record_session": "Spusťte záznam relace",
"horizon.agent.record_stop": "Zastavit záznam relace",
"horizon.repro.started": "Nahrávání zahájeno; F3+R to zastaví a zapíše svazek.",
"horizon.repro.stopped": "Nahrávání zastaveno: %s",
"horizon.repro.bundle": "Repro balíček: %s",
"horizon.repro.no_recording": "Zatím není k dispozici žádná nahrávka k exportu.",
"horizon.repro.replay_started": "Přehrávání zahájeno: %s",
"horizon.pack.addInfo": "Přidejte zdrojový balíček z Modrinth",
"horizon.pack.addWorking": "Ptát se Modrintha...",
"horizon.pack.addNone": "Nebyly nalezeny žádné balíčky zdrojů",
"horizon.pack.addTitle": "Přidejte Resource Pack",
"horizon.pack.install": "Instalovat",
"horizon.pack.installing": "Instalace",
"horizon.pack.installed": "Instalováno",
"horizon.pack.search": "Hledat",
"horizon.pack.searchHint": "Hledat Modrinth...",
"horizon.pack.filters": "Filtry",
"horizon.pack.filter.realistic": "Realistické",
"horizon.pack.filter.simplistic": "Zjednodušené",
"horizon.pack.filter.vanillaLike": "Vanilkové",
"horizon.pack.addFailed": "Balíček nelze přidat: %s",
"horizon.extras.header.cosmetics": "Kosmetika",
"horizon.extras.cosmetics_mine": "Moje kosmetika",
"horizon.extras.cosmetics_mine.tooltip": "Skryté: každý hráč Horizon vás vidí bez vaší kosmetiky, včetně vás. Stejný vypínač jako skříň odpalovacího zařízení.",
"horizon.extras.cosmetics_others": "Kosmetika ostatních hráčů",
"horizon.extras.cosmetics_others.tooltip": "Co nosí ostatní hráči Horizon: všechno, jen styly jmenovek nebo nic. Skryto, hra se nikdy neptá, co nosí.",
"horizon.extras.cosmetics_auras": "Aury a stezky ostatních",
"horizon.extras.cosmetics_auras.tooltip": "Aury a stezky, které nosí ostatní hráči. Ve výchozím nastavení vypnuto.",
"horizon.extras.cosmetics.shown": "Zobrazeno",
"horizon.extras.cosmetics.hidden": "Skrytá",
"horizon.extras.cosmetics.name_tags": "Pouze jmenovky"
}
@@ -333,6 +333,10 @@
"horizon.pages.split_settings": "Splitscreen-Einstellungen",
"horizon.pages.split_setup": "Splitscreen",
"horizon.pages.split_setup.tooltip": "Spieler an diesem Computer: Controller können deiner Welt beitreten.",
"Particle Culling": "Partikel-Culling",
"Draws every particle.": "Zeichnet alle Partikel.",
"Skips offscreen, subpixel and terrain-hidden particles.": "Überspringt Partikel außerhalb des Bildes, unterhalb eines Pixels oder hinter Terrain.",
"Skips offscreen, subpixel and terrain-hidden particles with less render-thread work.": "Überspringt Partikel außerhalb des Bildes, unterhalb eines Pixels oder hinter Terrain und entlastet den Render-Thread.",
"horizon.extras.header.cosmetics": "Kosmetik",
"horizon.extras.cosmetics_mine": "Meine Kosmetik",
"horizon.extras.cosmetics_mine.tooltip": "Ausgeblendet: Alle Horizon-Spieler sehen dich ohne deine Kosmetik, du selbst auch. Derselbe Schalter wie in der Garderobe des Launchers.",
@@ -0,0 +1,473 @@
{
"horizon.options.controller": "Ελεγκτής",
"horizon.options.vibration": "Δόνηση",
"horizon.options.adaptive_triggers": "Προσαρμοστικοί ενεργοποιητές",
"horizon.options.look_sensitivity": "Ευαισθησία κάμερας",
"horizon.options.invert_x": "Αντιστροφή κάμερας X",
"horizon.options.invert_y": "Αντιστροφή κάμερας Y",
"horizon.options.sneak_button": "Κουμπί σκυψίματος",
"horizon.options.move_deadzone": "Νεκρή ζώνη κίνησης",
"horizon.options.look_deadzone": "Νεκρή ζώνη κάμερας",
"horizon.options.button_glyphs": "Γλυφικά κουμπιών",
"horizon.options.menu_navigation": "Πλοήγηση μενού",
"horizon.options.on_screen_keyboard": "Πληκτρολόγιο οθόνης",
"horizon.options.chat_delay": "Καθυστέρηση συνομιλίας",
"horizon.options.lightbar.health": "Υγεία",
"horizon.options.lightbar.dimension": "Διάσταση",
"horizon.options.glyphs.auto": "Αυτόματο",
"horizon.options.menu_focus": "Εστίαση",
"horizon.options.menu_pointer": "Δείκτης",
"horizon.options.keyboard.auto": "Αυτόματο",
"horizon.options.unavailable": "Αυτή η δυνατότητα δεν είναι ακόμη διαθέσιμη στο Horizon.",
"horizon.options.search": "Ρυθμίσεις αναζήτησης...",
"horizon.pages.shader_packs": "Πακέτα Shader",
"horizon.pages.shader_options": "Επιλογές Shader",
"horizon.pages.controller": "Ρυθμίσεις ελεγκτή",
"horizon.pages.controller_binds": "Δεσμοί ελεγκτή",
"horizon.pages.settings": "Ρυθμίσεις Horizon",
"horizon.pages.agent": "Πράκτορας AI",
"horizon.split.leave": "Φύγε",
"horizon.pages.split_settings": "Ρυθμίσεις Splitscreen",
"horizon.pages.split_profiles": "Ποιος παίζει;",
"horizon.pages.split_setup": "Ρύθμιση Splitscreen",
"horizon.pages.music": "Μουσική",
"horizon.pages.music.menu": "Μενού",
"horizon.pages.music.overworld": "Υπερκόσμος",
"horizon.pages.music.creative": "Δημιουργικό",
"horizon.pages.music.underwater": "Υποβρύχια",
"horizon.pages.music.end": "Το Τέλος",
"horizon.pages.music.boss": "Αφεντικό",
"horizon.pages.music.credits": "Πιστώσεις",
"horizon.pages.music.overworld_biomes": "Υπερκόσμια βιώματα",
"horizon.pages.music.nether_biomes": "Ούτε βιώματα",
"horizon.pages.music.end_biomes": "Τελικοί βιομοί",
"horizon.pages.music.other": "Άλλη μουσική",
"horizon.pages.music.empty": "Χωρίς μουσικά κομμάτια: οι ήχοι του παιχνιδιού δεν φορτώνονται.",
"horizon.pages.music.tooltip": "Τα ενσωματωμένα κομμάτια, ανά περίπτωση: παίξτε ένα τώρα ή απενεργοποιήστε οποιοδήποτε, ώστε το παιχνίδι να σταματήσει να το επιλέγει.",
"horizon.pages.settings.tooltip": "Οι ρυθμίσεις του Horizon: γραφικά, χειριστήρια, πρόσθετα και mods.",
"horizon.pages.graphics.tooltip": "Γραφικά, απλά: κάθε ρύθμιση λέει τι κοστίζει.",
"horizon.pages.graphics_advanced.tooltip": "Κάθε ρύθμιση γραφικών, συμπεριλαμβανομένου του Horizon, με το κόστος του καθενός.",
"horizon.pages.controller.tooltip": "Χειριστήρια: τα κουμπιά, οι μοχλοί, οι κραδασμοί και η πλοήγηση στο μενού τους.",
"horizon.pages.extras.tooltip": "Προαιρετικές προσθήκες, όλες απενεργοποιημένες από προεπιλογή: το παιχνίδι παραμένει βανίλια μέχρι να το ενεργοποιήσετε.",
"horizon.pages.agent.tooltip": "Αφήστε τον δικό σας πράκτορα AI να παίξει: horizon-ctl και MCP πελάτες σε αυτόν τον υπολογιστή.",
"horizon.pages.split_profiles.tooltip": "Ποιος παίζει: ένα προφίλ που διατηρείται σε αυτόν τον φάκελο παιχνιδιού.",
"horizon.pages.split_setup.tooltip": "Τα παράθυρα και οι οθόνες και ποιος παίζει πού.",
"horizon.pages.shader_packs.tooltip": "Πακέτα Shader από το φάκελο shaderpacks: Τα δικά του Horizon και αυτά σε μορφή shaders/. Τρέχει ένας κάθε φορά.",
"horizon.pages.mods.tooltip": "Mods που δημιουργήθηκαν για το Horizon, από το φάκελο horizon-mods. Κάθε ένα τρέχει σε ένα sandbox και παραμένει απενεργοποιημένο μέχρι να το ενεργοποιήσετε.",
"horizon.pages.open.graphics": "Γραφικά...",
"horizon.pages.open.graphics_advanced": "Προηγμένα γραφικά...",
"horizon.pages.open.shader_packs": "Πακέτα Shader...",
"horizon.pages.open.controller": "Ρυθμίσεις ελεγκτή...",
"horizon.pages.open.split_setup": "Διαίρεση οθόνης...",
"horizon.pages.open.extras": "Έξτρα...",
"horizon.pages.open.agent": "Πράκτορας AI...",
"horizon.pages.open.controller_binds": "Ο ελεγκτής δεσμεύει...",
"horizon.pages.open.horizon_settings": "Ρυθμίσεις Horizon...",
"horizon.pages.open.music": "Μουσική...",
"horizon.mods.empty": "Χωρίς mods: τοποθετήστε τα αρχεία .hmod στο φάκελο horizon-mods",
"horizon.mods.stopped": " (Σταμάτησε)",
"horizon.mods.not_built": " (Δεν έχει κατασκευαστεί)",
"horizon.mods.settings": "Ρυθμίσεις",
"horizon.mods.in_world": " (άσε τον κόσμο να αλλάξει)",
"horizon.mods.open_folder": "Ανοίξτε το φάκελο Mod",
"horizon.shader_packs.empty": "Χωρίς πακέτα shader: τοποθετήστε τα στο φάκελο shaderpacks",
"horizon.shader_options.open": "Επιλογές Shader...",
"horizon.shader_options.profile": "Προφίλ",
"horizon.shader_options.loading": "Διαβάζοντας τις επιλογές του πακέτου shader...",
"horizon.agent.copy_details": "Αντιγραφή στοιχείων σύνδεσης",
"horizon.multiplayer.join": "Εγγραφείτε",
"horizon.multiplayer.cancel_reconnecting": "Ακύρωση επανασύνδεσης",
"horizon.multiplayer.join_friend": "Γίνετε μέλος ενός φίλου",
"horizon.multiplayer.invite_code": "Κωδικός πρόσκλησης",
"horizon.multiplayer.relay": "Ρελέ (προαιρετικό)",
"Preset": "Προκαθορισμένη",
"LOD Distance": "Απόσταση LOD",
"Far Detail": "Μακρινή λεπτομέρεια",
"Entity Culling": "Σφαγή οντοτήτων",
"Chunk Updates": "Ενημερώσεις κομματιών",
"Upload Budget": "Μεταφόρτωση προϋπολογισμού",
"Sky": "Ουρανός",
"Fog": "Ομίχλη",
"Weather": "Καιρός",
"Animated Textures": "Κινούμενες υφές",
"Present Mode": "Παρούσα λειτουργία",
"Frame Pacing": "Βηματοδότηση καρέ",
"Worker Threads": "Εργατικά νήματα",
"Resolution Scale": "Κλίμακα Ανάλυσης",
"Upscaling": "Αναβάθμιση",
"Paper White": "Λευκό χαρτί",
"Peak Brightness": "Μέγιστη φωτεινότητα",
"Black Level": "Μαύρο Επίπεδο",
"UI Brightness": "Φωτεινότητα διεπαφής χρήστη",
"Battery Mode": "Λειτουργία μπαταρίας",
"Graphics API": "API γραφικών",
"Translucent Batching": "Ημιδιαφανές παρτίδες",
"Performance Overlay": "Επικάλυψη απόδοσης",
"Full Detail Distance": "Απόσταση πλήρους λεπτομέρειας",
"On": "Ενεργό",
"Off": "Απενεργοποίηση",
"Unlimited": "Απεριόριστο",
"Auto": "Αυτόματο",
"Custom": "Προσαρμοσμένο",
"Performance": "Απόδοση",
"Balanced": "Ισορροπημένο",
"Quality": "Ποιότητα",
"Native": "Εγγενής",
"Full": "Γεμάτη",
"Reduced": "Μειώθηκε",
"Efficient": "Αποτελεσματική",
"Precise": "Ακριβές",
"Auto (VSync)": "Αυτόματο (VSync)",
"Mailbox": "Γραμματοκιβώτιο",
"Immediate": "Άμεση",
"FPS and Graph": "FPS και Γράφημα",
"TAA": "ΤΑΑ",
"No cost": "Χωρίς κόστος",
"Low cost": "Χαμηλό κόστος",
"Medium cost": "Μεσαίου κόστους",
"High cost": "Υψηλό κόστος",
"Saves time": "Εξοικονομεί χρόνο",
"Graphics": "Γραφικά",
"Done": "Έγινε",
"This feature is not yet available in Horizon.": "Αυτή η δυνατότητα δεν είναι ακόμη διαθέσιμη στο Horizon.",
"Your display or system doesn't offer HDR output.": "Η οθόνη ή το σύστημά σας δεν προσφέρει έξοδο HDR.",
"Turn HDR on to use it.": "Ενεργοποιήστε το HDR για να το χρησιμοποιήσετε.",
"Your GPU or graphics API doesn't support it.": "Η GPU ή το API γραφικών σας δεν το υποστηρίζουν.",
"%s chunks": "%s κομμάτια",
"%s per frame": "%s ανά πλαίσιο",
"%s MiB/frame": "%s MiB/πλαίσιο",
"%s KiB/frame": "%s KiB/πλαίσιο",
"Auto (%s)": "Αυτόματο (%s)",
"Full-detail terrain range. LOD Distance can extend local worlds farther.": "Εύρος εδάφους με πλήρη λεπτομέρεια. Η απόσταση LOD μπορεί να επεκτείνει τους τοπικούς κόσμους μακρύτερα.",
"Coarse distant terrain in local worlds. Integrated GPUs stop at 128 chunks.": "Χοντρό μακρινό έδαφος σε τοπικούς κόσμους. Οι ενσωματωμένες GPU σταματούν στα 128 κομμάτια.",
"Reduced draws far terrain coarser: faster on this integrated GPU.": "Μειωμένες έλξεις πολύ πιο χοντρό έδαφος: πιο γρήγορα σε αυτήν την ενσωματωμένη GPU.",
"Reduced draws far terrain coarser, for GPUs it slows down.": "Οι μειωμένες έλξεις πολύ πιο τραχύ εδάφους, για τις GPU επιβραδύνουν.",
"Field of view. Wider shows more terrain at once.": "Οπτικό πεδίο. Το ευρύτερο δείχνει περισσότερο έδαφος ταυτόχρονα.",
"Caps frames per second; a cap saves power and heat.": "Καπάκια καρέ ανά δευτερόλεπτο. ένα καπάκι εξοικονομεί ενέργεια και θερμότητα.",
"Waits for the display's refresh: no tearing, a little latency.": "Περιμένει για την ανανέωση της οθόνης: χωρίς σκίσιμο, λίγο λανθάνουσα κατάσταση.",
"Size of menus and the HUD.": "Το μέγεθος των μενού και το HUD.",
"Sets the options below together. Changing one makes it Custom.": "Ρυθμίζει τις παρακάτω επιλογές μαζί. Η αλλαγή ενός το καθιστά Προσαρμοσμένο.",
"Lava, fire and sunlight shine brighter than white. Needs an HDR display.": "Η λάβα, η φωτιά και το φως του ήλιου λάμπουν πιο φωτεινά από το λευκό. Χρειάζεται οθόνη HDR.",
"Your display's darkest black. 0 for OLED; LCDs glow a little.": "Η οθόνη σας είναι το πιο σκούρο μαύρο. 0 για OLED? Οι LCD λάμπουν λίγο.",
"How bright highlights get. Auto: the peak your system reports.": "Πόσο φωτεινά σημεία αποκτούν. Auto: η κορύφωση που αναφέρει το σύστημά σας.",
"How bright white paper and menus look. Auto: your desktop's white.": "Πόσο φωτεινό φαίνεται το λευκό χαρτί και τα μενού. Αυτόματο: η επιφάνεια εργασίας σας είναι λευκή.",
"How bright the HUD and menus are, against paper white.": "Πόσο φωτεινά είναι τα HUD και τα μενού, σε σχέση με το λευκό χαρτί.",
"How far mobs, crops and machines keep working. CPU time.": "Πόσο μακριά συνεχίζουν να λειτουργούν όχλοι, καλλιέργειες και μηχανές. Χρόνος CPU.",
"How far away mobs and items are drawn, as a share of normal.": "Πόσο μακριά κληρώνονται όχλοι και αντικείμενα, ως ποσοστό του κανονικού.",
"Skips terrain hidden behind closed sections. Off costs a lot.": "Παρακάμπτει το έδαφος που κρύβεται πίσω από κλειστά τμήματα. Το off κοστίζει πολύ.",
"Hides entities behind opaque blocks.": "Κρύβει οντότητες πίσω από αδιαφανή μπλοκ.",
"No entity occlusion culling.": "Δεν υπάρχει σφαγή απόφραξης οντοτήτων.",
"CPU occlusion test runs this frame.": "Η δοκιμή απόφραξης CPU εκτελεί αυτό το πλαίσιο.",
"Occlusion checks run on a worker thread.": "Οι έλεγχοι απόφραξης εκτελούνται σε ένα νήμα εργασίας.",
"Meshed sections uploaded per frame. Lower is smoother while loading.": "Διχτυωτές τομές μεταφορτώθηκαν ανά πλαίσιο. Το Lower είναι πιο ομαλό κατά τη φόρτωση.",
"Soft shadows in corners. Costs chunk building time only.": "Απαλές σκιές στις γωνίες. Κόστος μόνο τμηματικός χρόνος κατασκευής.",
"Smaller copies of block textures for distant terrain: less shimmer.": "Μικρότερα αντίγραφα υφής μπλοκ για μακρινό έδαφος: λιγότερη λάμψη.",
"Blends grass and water colours across biomes when building chunks.": "Αναμειγνύει γρασίδι και χρώματα νερού στα biomes κατά την κατασκευή κομματιών.",
"Cloud layer: off, flat (fast) or 3D (fancy).": "Στρώμα σύννεφου: απενεργοποιημένο, επίπεδο (γρήγορο) ή 3D (φανταχτερό).",
"How far clouds reach, in chunks.": "Πόσο μακριά φτάνουν τα σύννεφα, σε κομμάτια.",
"Draws the sky, sun, moon and stars.": "Ζωγραφίζει τον ουρανό, τον ήλιο, το φεγγάρι και τα αστέρια.",
"Distance fog. Off shows the edge of the loaded world.": "Ομίχλη από απόσταση. Το Off δείχνει την άκρη του φορτωμένου κόσμου.",
"Draws rain and snow.": "Ζωγραφίζει βροχή και χιόνι.",
"How far rain and snow fall around you.": "Πόσο μακριά βρέχει και χιόνι πέφτει γύρω σας.",
"How many particles effects spawn.": "Πόσα αποτελέσματα σωματιδίων γεννιούνται.",
"Round shadows under mobs and items.": "Στρογγυλές σκιές κάτω από όχλους και αντικείμενα.",
"Leaves with see-through gaps. Off draws them solid.": "Φύλλα με διαφανή κενά. Off τους τραβάει στερεά.",
"Sorts water and glass more exactly behind each other.": "Ταξινομεί το νερό και το ποτήρι με μεγαλύτερη ακρίβεια το ένα πίσω από το άλλο.",
"Which chunk rebuilds wait for the frame: none, nearby or yours.": "Ποιο κομμάτι ανακατασκευάζεται περιμένει το πλαίσιο: κανένα, κοντά ή δικό σας.",
"Animates water, lava, fire and other moving textures.": "Ζωντανεύει νερό, λάβα, φωτιά και άλλες κινούμενες υφές.",
"World pixels per screen pixel. Below 100% is faster on the GPU.": "Παγκόσμια εικονοστοιχεία ανά εικονοστοιχείο οθόνης. Κάτω από το 100% είναι πιο γρήγορο στη GPU.",
"Smooths jagged edges. FXAA: softer. TAA: smoothest, moving things may trail.": "Λειαίνει τις οδοντωτές άκρες. FXAA: πιο μαλακό. ΤΑΑ: τα πιο ομαλά, κινούμενα πράγματα μπορεί να ακολουθούν.",
"Renders the world smaller and rebuilds it with TAA. Faster, softer.": "Καθιστά τον κόσμο μικρότερο και τον ξαναχτίζει με ΤΑΑ. Πιο γρήγορα, πιο μαλακά.",
"HDR output on an HDR display: lava, fire and sunlight shine brighter.": "Έξοδος HDR σε οθόνη HDR: η λάβα, η φωτιά και το φως του ήλιου λάμπουν πιο έντονα.",
"How frames reach the screen while VSync is off.": "Πώς τα καρέ φτάνουν στην οθόνη ενώ το VSync είναι απενεργοποιημένο.",
"Efficient sleeps until the next frame; Precise spins, like vanilla.": "Αποτελεσματικοί ύπνοι μέχρι το επόμενο καρέ. Ακριβές περιστροφές, όπως η βανίλια.",
"Fills the screen (borderless).": "Γεμίζει την οθόνη (χωρίς περιθώρια).",
"Brightens dark places.": "Φωτίζει τα σκοτεινά μέρη.",
"Lowers the frame rate when minimised, or idle too.": "Μειώνει τον ρυθμό καρέ όταν είναι ελαχιστοποιημένος ή και σε αδράνεια.",
"Sways the view while walking.": "Κουνάει τη θέα ενώ περπατάτε.",
"Fades newly loaded chunks in.": "Ξεθωριάζει τα πρόσφατα φορτωμένα κομμάτια.",
"Darkens the screen's edges.": "Σκουραίνει τα άκρα της οθόνης.",
"Shows when the world saves.": "Δείχνει όταν ο κόσμος σώζει.",
"Shows attack cooldown.": "Εμφανίζει ψύξη επίθεσης.",
"60 FPS cap (30 in menus or unfocused), half the workers: less power.": "Καπάκι 60 FPS (30 σε μενού ή χωρίς εστίαση), οι μισοί εργαζόμενοι: λιγότερη ισχύς.",
"Threads that generate, light and mesh chunks. Next start.": "Κλωστές που δημιουργούν, φωτίζουν και πλένουν κομμάτια. Επόμενη αρχή.",
"Vulkan, then DirectX 12 (Windows) or OpenGL (Linux) where it fails. Next start.": "Vulkan και μετά DirectX 12 (Windows) ή OpenGL (Linux) όπου αποτυγχάνει. Επόμενη αρχή.",
"Water and glass in one buffer: fewer draw calls, a bit more VRAM. Next start.": "Νερό και ποτήρι σε ένα buffer: λιγότερες κλήσεις κλήσεων, λίγο περισσότερη VRAM. Επόμενη αρχή.",
"Mesh data sent to the GPU per frame. Lower is smoother while loading.": "Τα δεδομένα πλέγματος αποστέλλονται στη GPU ανά πλαίσιο. Το Lower είναι πιο ομαλό κατά τη φόρτωση.",
"Frame rate and frame times over the game, with a graph.": "Ρυθμός καρέ και χρόνοι καρέ κατά τη διάρκεια του παιχνιδιού, με ένα γράφημα.",
"horizon.multiplayer.finding_friend": "Βρες τον κόσμο του φίλου σου...",
"horizon.multiplayer.not_signed_in": "Αυτός ο διακομιστής είναι σε λειτουργία online. Συνδεθείτε με τον λογαριασμό σας Microsoft στο πρόγραμμα εκκίνησης Horizon για να εγγραφείτε.",
"horizon.multiplayer.invalid_address": "Μη έγκυρη διεύθυνση διακομιστή: %s",
"horizon.multiplayer.connected_friend_direct": "Συνδέθηκε απευθείας με τον φίλο σας...",
"horizon.multiplayer.connected_friend_relay": "Συνδέθηκε με τον φίλο σας μέσω του ρελέ...",
"General": "Στρατηγός",
"Advanced": "Προχωρημένο",
"Undo": "Αναίρεση",
"Search options": "Επιλογές αναζήτησης",
"Shortcut": "Συντόμευση",
"Distance": "Απόσταση",
"Display": "Εμφάνιση",
"Interface": "Διασύνδεση",
"Sky and weather": "Ουρανός και καιρός",
"Lighting and entities": "Φωτισμός και οντότητες",
"Textures": "Υφές",
"Image": "Εικόνα",
"Chunk loading": "Φόρτωση κομματιού",
"Culling": "Σφαγή",
"Power": "Δύναμη",
"Frames": "Κορνίζες",
"Overlay": "Επικάλυψη",
"Output": "Έξοδος",
"Brightness": "Φωτεινότητα",
"How far you see, the window and the HUD.": "Πόσο μακριά βλέπετε, το παράθυρο και το HUD.",
"The sky and weather, lighting, textures and the image.": "Ο ουρανός και ο καιρός, ο φωτισμός, οι υφές και η εικόνα.",
"Chunk loading, culling and power use.": "Φόρτωση κομματιών, σφαγή και χρήση ενέργειας.",
"How frames reach the screen, and the performance overlay.": "Πώς φτάνουν τα καρέ στην οθόνη και η επικάλυψη απόδοσης.",
"Brighter-than-white output on an HDR display.": "Έξοδος φωτεινότερη από το λευκό σε οθόνη HDR.",
"Results for \"%s\"": "Αποτελέσματα για \"%s\"",
"No settings match.": "Δεν ταιριάζουν ρυθμίσεις.",
"horizon.title.not_affiliated": "Δεν συνδέεται με τη Mojang ή τη Microsoft",
"horizon.extras.header.lighting": "Φωτισμός",
"horizon.extras.header.third_person": "Τρίτο πρόσωπο",
"horizon.extras.header.particles": "Σωματίδια",
"horizon.extras.header.inventory": "Απογραφή",
"horizon.extras.header.chat": "Συνομιλία",
"horizon.extras.header.sound": "Ήχος",
"horizon.extras.header.menus": "Μενού",
"horizon.extras.dynamic_lights": "Δυναμικά φώτα",
"horizon.extras.own_name_tag": "Δική ετικέτα ονόματος",
"horizon.extras.hide_block_particles": "Απόκρυψη σωματιδίων θραύσης μπλοκ",
"horizon.extras.auto_reconnect": "Αυτόματη επανασύνδεση",
"horizon.extras.ui_sound_reserve": "Διατηρήστε τα κανάλια για ήχους διεπαφής χρήστη",
"horizon.extras.music_page": "Σελίδα μουσικής",
"horizon.extras.mouse_tweaks": "Στοιχεία ελέγχου Mouse Tweaks",
"horizon.extras.mouse_tweaks_wheel": "Ο τροχός κύλισης μετακινεί στοιχεία",
"horizon.extras.sort": "Κουμπιά ταξινόμησης",
"horizon.extras.sort_key": "Πλήκτρο ταξινόμησης",
"horizon.extras.no_ai": "Όχι AI",
"horizon.extras.agent_control": "Έλεγχος πράκτορα",
"horizon.extras.discord_presence": "Discord Πλούσια Παρουσία",
"horizon.extras.chat_animation": "Ομαλή συνομιλία",
"horizon.extras.chat_indicator": "Ένδειξη μηνύματος",
"horizon.extras.wheel_cycles_settings": "Ο τροχός κύλισης αλλάζει τις ρυθμίσεις",
"horizon.extras.pack_browser": "Πρόγραμμα περιήγησης πακέτου πόρων",
"horizon.extras.fullbright.tooltip": "Εμφάνιση μπλοκ και οντοτήτων σε πλήρη φωτισμό, ακόμη και σε σκοτεινές περιοχές.",
"horizon.extras.dynamic_lights.tooltip": "Πυρσοί και άλλες πηγές φωτός που συγκρατούνται, πέφτουν ή καίγονται ανάβουν τα μπλοκ γύρω τους.",
"horizon.extras.own_name_tag.tooltip": "Δείχνει το όνομά σας πάνω από το κεφάλι σας σε τρίτο πρόσωπο, όπως το βλέπουν άλλοι παίκτες. Κρύβεται όταν ο διακομιστής κρύβει τα ονόματα της ομάδας σας ή όταν είστε αόρατοι.",
"horizon.extras.hide_block_particles.tooltip": "Κρύβει τα σωματίδια των συντριμμιών που σκάνε από ένα σπασμένο μπλοκ και θρυμματίζονται από αυτό που εξορύσσετε. Άλλα σωματίδια παραμένουν.",
"horizon.extras.auto_reconnect.tooltip": "Επανέρχεται σε έναν διακομιστή μετά από απώλεια σύνδεσης ή επανεκκίνηση, ποτέ μετά από κλωτσιά ή αποκλεισμό.",
"horizon.extras.ui_sound_reserve.tooltip": "Οι ήχοι στον κόσμο αφήνουν ελεύθερα 16 από τα 247 κανάλια ήχου, έτσι μια πλημμύρα από αυτά (μια μεγάλη έκρηξη) δεν μπορεί να σιγήσει τα κλικ του μενού.",
"horizon.extras.music_page.tooltip": "Το Music & Sounds αποκτά μια σελίδα Μουσική...: παίξτε οποιοδήποτε ενσωματωμένο κομμάτι τώρα ή απενεργοποιήστε ένα, ώστε το παιχνίδι να σταματήσει να το επιλέγει. Τίποτα δεν αλλάζει μέχρι να απενεργοποιήσετε ένα κομμάτι.",
"horizon.extras.mouse_tweaks.tooltip": "Δεξιά σύρετε ένα ανά υποδοχή, σύρετε αριστερά συγκεντρώνετε το στοιχείο που κρατάτε, Shift + σύρετε αριστερά μετακινείτε κάθε υποδοχή.",
"horizon.extras.mouse_tweaks_wheel.tooltip": "Το Down στέλνει ένα στοιχείο της υποδοχής στην άλλη πλευρά, το επάνω φέρνει ένα πίσω.",
"horizon.extras.sort.tooltip": "Ταξινομεί το απόθεμα, τα κιβώτια, τα βαρέλια, τα κιβώτια τελικής επεξεργασίας και τα κουτιά shulker κατά σειρά δημιουργικών καρτελών, συγχωνεύοντας στοίβες.",
"horizon.extras.sort_key.tooltip": "Ταξινομεί το τμήμα κάτω από τον κέρσορα. Κάντε κλικ και μετά πατήστε ένα πλήκτρο. Η απόδραση το λύνει.",
"horizon.extras.no_ai.tooltip": "Αποκρύπτει και απενεργοποιεί κάθε δυνατότητα AI: έλεγχος πράκτορα, horizon-ctl και διακομιστές MCP. Ο διακόπτης του εκτοξευτή επίσης.",
"horizon.extras.agent_control.tooltip": "Ο δικός σας πράκτορας AI μπορεί να παίξει αυτό το παιχνίδι μέσω του horizon-ctl ή ενός προγράμματος-πελάτη MCP, μόνο σε αυτόν τον υπολογιστή.",
"horizon.extras.discord_presence.tooltip": "Εμφανίζει το Playing Horizon στο προφίλ σας Discord ενώ εκτελείται το Discord: μενού, για έναν παίκτη ή για πολλούς παίκτες, τη διάσταση και την ώρα αναπαραγωγής. Ποτέ το όνομα ενός κόσμου ή η διεύθυνση ενός διακομιστή.",
"Calibrate...": "Βαθμονόμηση...",
"Calibrate Anyway...": "Βαθμονόμηση πάντως...",
"Use Automatic Setup": "Χρησιμοποιήστε την Αυτόματη Ρύθμιση",
"Shortcut: %s": "Συντόμευση: %s",
"Next": "Επόμενο",
"HDR Calibration %s/%s: %s": "Βαθμονόμηση HDR %s/%s: %s",
"Sets the three below full screen, one test picture at a time.": "Ορίζει τις τρεις παρακάτω πλήρη οθόνη, μία δοκιμαστική εικόνα τη φορά.",
"A key that opens this screen from the game. Not bound at first.": "Ένα κλειδί που ανοίγει αυτήν την οθόνη από το παιχνίδι. Δεν δεσμεύεται στην αρχή.",
"Your display didn't say how bright it gets: calibrate to set it up.": "Η οθόνη σας δεν έλεγε πόσο φωτεινή γίνεται: βαθμονομήστε για να τη ρυθμίσετε.",
"Already set up for your display. Only calibrate if HDR looks wrong.": "Έχει ήδη ρυθμιστεί για την οθόνη σας. Βαθμονόμηση μόνο εάν το HDR φαίνεται λάθος.",
"Puts Peak Brightness and Paper White back to your display's setup.": "Επαναφέρει το Peak Brightness και το Paper White στη ρύθμιση της οθόνης σας.",
"Set up for your display. Leave on Auto unless it looks wrong.": "Ρύθμιση για την οθόνη σας. Αφήστε το \"Αυτόματο\" εκτός εάν φαίνεται λάθος.",
"Lower it until the logo just disappears into the black.": "Χαμηλώστε το μέχρι να εξαφανιστεί το λογότυπο στο μαύρο.",
"Raise it until the logo just disappears into the bright square.": "Σηκώστε το μέχρι να εξαφανιστεί το λογότυπο στο φωτεινό τετράγωνο.",
"Make the card a white that's comfortable to look at for a long time, in the light you play in.": "Κάντε την κάρτα λευκή που είναι άνετη για να την κοιτάτε για πολλή ώρα, στο φως που παίζετε.",
"horizon.splitscreen.profiles.forget": "Ξεχάστε",
"horizon.splitscreen.profiles.create": "Δημιουργία",
"horizon.splitscreen.profiles.you": " - εσύ",
"horizon.splitscreen.profiles.forget_named": "Ξεχάστε %s",
"horizon.splitscreen.profiles.previous": "Προηγούμενο",
"horizon.splitscreen.profiles.next": "Επόμενο",
"horizon.splitscreen.profiles.new_button": "Νέο Προφίλ...",
"horizon.splitscreen.profiles.forget_title": "Ξεχάστε το προφίλ;",
"horizon.splitscreen.profiles.forget_leaves": "Φεύγει από τη λίστα αυτής της περίπτωσης.",
"horizon.splitscreen.profiles.forget_kept": "Η παγκόσμια πρόοδος και οι ρυθμίσεις διατηρούνται.",
"horizon.splitscreen.profiles.new_title": "Νέο Προφίλ",
"horizon.splitscreen.profiles.name_hint": "Όνομα (3 έως 16 γράμματα, ψηφία, _)",
"horizon.splitscreen.profiles.switch_title": "Αλλαγή προφίλ",
"horizon.splitscreen.profiles.offline_note": "Τα προφίλ εκτός σύνδεσης ανήκουν σε αυτήν την περίπτωση",
"horizon.splitscreen.profiles.move": "Μετακινηθείτε όπου παίζετε",
"horizon.splitscreen.profiles.move_place": "Μετακινηθείτε όπου παίζετε: %s",
"horizon.friends.title": "Παίξτε με φίλους",
"horizon.friends.hint": "Οι φίλοι επικολλούν τον κώδικα μετά το κουμπί Φίλοι της οθόνης τίτλου, στην Άμεση σύνδεση ή στη σελίδα Αναπαραγωγή του προγράμματος εκκίνησης.",
"horizon.friends.copied": "Αντιγράφηκε",
"horizon.friends.copy_code": "Αντιγραφή Κωδικού",
"horizon.friends.stop_sharing": "Διακοπή κοινής χρήσης",
"horizon.friends.none_yet": "Δεν υπάρχουν φίλοι εδώ ακόμα.",
"horizon.friends.here_now": "Εδώ τώρα: %s",
"horizon.friends.share_intro": "Μοιραστείτε αυτόν τον κόσμο πίσω από έναν κωδικό πρόσκλησης: ανοίγει σε LAN και οι φίλοι στο Διαδίκτυο συμμετέχουν με τον κωδικό. Κανένας διακομιστής μας δεν εμπλέκεται.",
"horizon.friends.start_sharing": "Ξεκινήστε την κοινή χρήση",
"horizon.friends.troubleshooting": "Αντιμετώπιση προβλημάτων...",
"horizon.friends.stopped": "Σταμάτησε η κοινή χρήση του κωδικού πρόσκλησης.",
"horizon.friends.short_code_changed": "Κάποιος συνέχισε να δοκιμάζει έναν λάθος σύντομο κωδικό, οπότε άλλαξε.",
"horizon.friends.wrong_code": "Κάποιος δοκίμασε λάθος κωδικό.",
"horizon.friends.code_ready": "Ο κωδικός πρόσκλησής σας είναι έτοιμος: Μενού παιχνιδιού, Παίξτε με φίλους. Αντιγράψτε το και στείλτε το στους φίλους σας.",
"horizon.friends.share_failed": "Δεν μπορούσα να μοιραστώ τον κόσμο: %s",
"horizon.friends.finding_route": "Βρείτε πώς μπορούν να σας φτάσουν οι φίλοι…",
"horizon.osk.shift": "Μετατόπιση",
"horizon.osk.space": "Διάστημα",
"horizon.osk.delete": "Διαγραφή",
"horizon.osk.type": "Τύπος",
"horizon.osk.symbols": "Σύμβολα",
"horizon.osk.close": "Κλείσιμο",
"horizon.extras.chat_animation.tooltip": "Μια νέα γραμμή συνομιλίας ολισθαίνει από τα αριστερά ενώ σβήνει, αντί να εμφανίζεται ολόκληρη.",
"horizon.extras.chat_indicator.tooltip": "Η έγχρωμη γραμμή στα αριστερά μιας γραμμής συνομιλίας.",
"horizon.extras.wheel_cycles_settings.tooltip": "Ο τροχός κύλισης πάνω από ένα κουμπί στις ρυθμίσεις αλλάζει την τιμή του, όπως στη βανίλια. Ανενεργό, ο τροχός κάνει κύλιση μόνο στη λίστα.",
"horizon.extras.pack_browser.tooltip": "Το Select Resource Packs παίρνει ένα κουμπί Προσθήκη που αναζητά το Modrinth και εγκαθιστά ένα πακέτο στο φάκελο των πακέτων σας. Εκτός, το παιχνίδι δεν έρχεται ποτέ σε επαφή με τη Modrinth.",
"horizon.extras.splitscreen.tooltip": "Σε έναν κόσμο, ένας άλλος ελεγκτής μπορεί να εγγραφεί ως νέος παίκτης: πατήστε A όταν σας ζητήσει, μετά επιλέξτε ένα προφίλ και πού θα παίξετε.",
"horizon.splitscreen.setup.monitor": "Οθόνη %s",
"horizon.splitscreen.setup.monitor_unknown": "μια οθόνη",
"horizon.splitscreen.setup.window": "Παράθυρο %s",
"horizon.splitscreen.setup.new_window": "Νέο παράθυρο",
"horizon.splitscreen.setup.fill_monitor": "Γέμισμα %s",
"horizon.splitscreen.setup.done": "Έγινε",
"horizon.splitscreen.setup.on": "Ενεργό",
"horizon.splitscreen.setup.off": "Απενεργοποίηση",
"horizon.splitscreen.setup.player": "Παίκτης %s",
"horizon.splitscreen.setup.revert": "Επαναφορά",
"horizon.splitscreen.setup.apply": "Εφαρμόστε",
"horizon.splitscreen.setup.warning.empty_main": "Κανείς δεν παίζει στο Παράθυρο 1: κρύβεται",
"horizon.splitscreen.setup.warning.empty_close": "Κανείς δεν παίζει στο Παράθυρο %s: κλείνει στην Εφαρμογή",
"horizon.splitscreen.setup.warning.empty_new": "Κανείς δεν παίζει στο Παράθυρο %s: δεν ανοίγει",
"horizon.splitscreen.setup.warning.on_main": "Το παράθυρο %s γεμίζει την οθόνη του παραθύρου 1: οι παίκτες του παίζουν στο Παράθυρο 1",
"horizon.splitscreen.setup.warning.unplugged": "Η οθόνη του παραθύρου %s δεν είναι συνδεδεμένη: οι παίκτες του παίζουν στο Παράθυρο 1",
"horizon.splitscreen.setup.status.off": "Η διαχωριστική οθόνη είναι απενεργοποιημένη.",
"horizon.splitscreen.setup.status.enable_hint": "Ενεργοποιήστε το και, στη συνέχεια, πατήστε ένα κουμπί σε άλλο χειριστήριο σε έναν κόσμο.",
"horizon.splitscreen.setup.status.join_hint": "Πατήστε A για να εγγραφείτε και να επιλέξετε ένα προφίλ.",
"horizon.splitscreen.setup.status.idle": "Splitscreen σε αδράνεια",
"horizon.splitscreen.setup.status.alone": "Δεν υπάρχουν άλλοι τοπικοί παίκτες.",
"horizon.splitscreen.setup.status.solo_controls": "Τα σόλο χειριστήρια και τα σχόλια του ελεγκτή παραμένουν αμετάβλητα.",
"horizon.splitscreen.setup.window_empty": "Παράθυρο %s: κενό",
"horizon.splitscreen.setup.note.select": "Κάντε κλικ σε ένα πρόγραμμα αναπαραγωγής ή σύρετέ το σε ένα παράθυρο ή μια οθόνη.",
"horizon.splitscreen.setup.note.apply": "Εφαρμογή για αναπαραγωγή με αυτόν τον τρόπο, Επαναφορά για αναίρεση.",
"horizon.splitscreen.setup.note.place": "Πού πρέπει να παίξει ο %s;",
"horizon.splitscreen.setup.this_player": "αυτός ο παίκτης",
"horizon.splitscreen.setup.switch_disabled": "Το Splitscreen απενεργοποιείται μόλις αποχωρήσουν οι υπόλοιποι (μενού παύσης).",
"horizon.splitscreen.setup.window_place": "Παράθυρο %s (%s από %s)",
"horizon.splitscreen.setup.names": "Ονόματα",
"horizon.splitscreen.setup.identify": "Προσδιορίστε",
"horizon.splitscreen.setup.layout.two": "2 κοινή χρήση: %s",
"horizon.splitscreen.setup.layout.three": "3 κοινή χρήση: %s",
"horizon.splitscreen.setup.layout.two.0": "Αυτόματο",
"horizon.splitscreen.setup.layout.two.1": "Δίπλα δίπλα",
"horizon.splitscreen.setup.layout.two.2": "Πάνω και κάτω",
"horizon.splitscreen.setup.layout.three.0": "Ένα φαρδύ από πάνω",
"horizon.splitscreen.setup.layout.three.1": "Ένας ψηλός στα αριστερά",
"horizon.splitscreen.setup.layout.three.2": "Δίπλα δίπλα",
"horizon.splitscreen.setup.help.player": "Κάντε κλικ ή σύρετε %s για να τα μετακινήσετε.",
"horizon.splitscreen.setup.help.layout_auto": "%s (δίπλα όταν το παράθυρο είναι φαρδύ). Πατήστε για αλλαγή.",
"horizon.splitscreen.setup.help.layout": "%s. Πατήστε για αλλαγή.",
"horizon.splitscreen.setup.help.switch": "Διαχωρισμένη οθόνη για αυτόν τον υπολογιστή, ενεργοποιημένη ή απενεργοποιημένη.",
"horizon.splitscreen.setup.help.identify": "Η προβολή κάθε παίκτη δείχνει σε ποιο παράθυρο βρίσκεται.",
"horizon.splitscreen.setup.help.names": "Το όνομα κάθε παίκτη στη γωνία της όψης του.",
"horizon.splitscreen.setup.help.revert": "Αναίρεση των αλλαγών που δεν έχουν εφαρμοστεί ακόμα.",
"horizon.splitscreen.setup.help.apply": "Παίξτε με τον τρόπο που δείχνει ο χάρτης.",
"horizon.splitscreen.setup.help.unchanged": "Τίποτα δεν έχει αλλάξει ακόμα.",
"horizon.splitscreen.prompt.controller_connected": "Ο ελεγκτής είναι συνδεδεμένος",
"horizon.splitscreen.prompt.controller_disconnected": "Ο ελεγκτής αποσυνδέθηκε",
"horizon.splitscreen.prompt.controller_disconnected.hint": "Συνδέστε το ξανά ή πατήστε ένα κουμπί σε άλλο",
"horizon.splitscreen.prompt.join.one": "Ο %s θέλει να συμμετάσχει",
"horizon.splitscreen.prompt.join.many": "Οι ελεγκτές %s θέλουν να συμμετάσχουν",
"horizon.splitscreen.prompt.join.yes": "Εγγραφείτε",
"horizon.splitscreen.prompt.join.as_p1": "Παίξτε ως P1",
"horizon.splitscreen.prompt.join.no": "Όχι",
"horizon.splitscreen.prompt.lost": "%s: ο ελεγκτής αποσυνδέθηκε",
"horizon.splitscreen.prompt.lost.use_another": "Χρησιμοποιήστε άλλο",
"horizon.splitscreen.prompt.lost.leave": "Φύγε",
"horizon.splitscreen.setup.help.give_up_pad": "Ο ελεγκτής σας σταματά να σας οδηγεί και του προσφέρεται να συμμετάσχει (A).",
"horizon.splitscreen.setup.note.held_at": "%s σε %s: Ο Α το ρίχνει εδώ, ο Β το βάζει πίσω.",
"horizon.splitscreen.setup.note.held": "%s σήκωσε: αριστερά/δεξιά διαλέγει πού, ο Α πέφτει, ο Β το βάζει πίσω.",
"Hides models behind opaque blocks. Async checks off-thread; entities tick.": "Κρύβει μοντέλα πίσω από αδιαφανή μπλοκ. Ασύγχρονοι έλεγχοι εκτός νήματος. οντότητες τικ.",
"Block Entities": "Αποκλεισμός οντοτήτων",
"Shulker Boxes": "Κουτιά Shulker",
"Reuses settled boxes; lid movement stays animated.": "Επαναχρησιμοποιεί τα καθιζημένα κουτιά. Η κίνηση του καπακιού παραμένει κινούμενη.",
"Signs": "Σημάδια",
"Reuses sign text until text, light, or font changes.": "Επαναχρησιμοποιεί το κείμενο της πινακίδας μέχρι να αλλάξει το κείμενο, το φως ή η γραμματοσειρά.",
"Decorated Pots": "Διακοσμημένες γλάστρες",
"Reuses still pots; break wobble and sherd changes redraw.": "Επαναχρησιμοποιεί γλάστρες. σπάσιμο ταλάντευση και όστρακα αλλαγές εκ νέου σχεδίαση.",
"Bells": "Καμπάνες",
"Reuses still bells; ringing stays animated.": "Επαναχρησιμοποιεί ακίνητα κουδούνια. Το κουδούνισμα παραμένει κινούμενο.",
"Chests": "Σεντούκια",
"Reuses closed chests; moving lids stay animated.": "Επαναχρησιμοποιεί τα κλειστά σεντούκια. Τα κινούμενα καπάκια παραμένουν κινούμενα.",
"Banners": "Πανό",
"Reuses poles; flags and pattern layers still update.": "Επαναχρησιμοποιεί τους πόλους. Οι σημαίες και τα επίπεδα μοτίβων εξακολουθούν να ενημερώνονται.",
"Copper Golem Statues": "Χάλκινα αγάλματα Golem",
"Reuses statue geometry until its block state changes.": "Επαναχρησιμοποιεί τη γεωμετρία του αγάλματος μέχρι να αλλάξει η κατάσταση μπλοκ.",
"Leaf Culling": "Αποκοπή φύλλων",
"Every leaf face. Vanilla's fancy leaves.": "Κάθε πρόσωπο φύλλου. Φανταχτά φύλλα βανίλιας.",
"Distant Plant Dither": "Μακρινό Φυτό Dither",
"Keeps fine plants in high-res packs from fading far away.": "Διατηρεί τα εκλεκτά φυτά σε συσκευασίες υψηλής ανάλυσης από το να ξεθωριάσουν μακριά.",
"Screenshot Quality": "Ποιότητα στιγμιότυπου οθόνης",
"F2 screenshots at this many times the game's resolution. Higher takes longer.": "Στιγμιότυπα οθόνης F2 σε αυτό πολλές φορές την ανάλυση του παιχνιδιού. Το υψηλότερο απαιτεί περισσότερο χρόνο.",
"Frame Generation": "Γενιά πλαισίων",
"Shows a made-up frame between each two real ones: smoother, a little more lag.": "Εμφανίζει ένα φτιαγμένο καρέ ανάμεσα σε καθένα από τα δύο πραγματικά: πιο ομαλό, λίγο μεγαλύτερη καθυστέρηση.",
"Reuses the pack shadow map when sun, view and world match. Off by default.": "Επαναχρησιμοποιεί τον χάρτη σκιάς πακέτου όταν ο ήλιος, η θέα και ο κόσμος ταιριάζουν. Απενεργοποίηση από προεπιλογή.",
"Find BlueMap": "Βρείτε το BlueMap",
"On servers, finds their BlueMap web map for far terrain. Next join.": "Στους διακομιστές, βρίσκει τον ιστό χάρτη τους BlueMap για μακρινό έδαφος. Επόμενη συμμετοχή.",
"How far around you BlueMap tiles are downloaded. Next join.": "Πόσο μακριά γίνεται λήψη των πλακιδίων BlueMap. Επόμενη συμμετοχή.",
"Synchronous": "Σύγχρονη",
"Asynchronous": "Ασύγχρονη",
"Solid": "Στερεά",
"Solid Aggressive": "Στερεά επιθετικά",
"Hollow": "Κούφιο",
"Leaves fully inside a canopy draw solid: fewer see-through layers.": "Τα φύλλα πλήρως μέσα σε ένα θόλο τραβούν στερεά: λιγότερα διαφανή στρώματα.",
"Leaves with one open side draw solid too: faster, chunkier edges.": "Τα φύλλα με μια ανοιχτή πλευρά τραβούν επίσης στερεά: πιο γρήγορες, πιο χοντρές άκρες.",
"Drops faces between leaves: faster, but gaps look through.": "Πέφτει όψεις ανάμεσα στα φύλλα: πιο γρήγορα, αλλά τα κενά φαίνονται μέσα.",
"Hotbar: Previous Slot": "Hotbar: Προηγούμενη υποδοχή",
"Hotbar: Next Slot": "Hotbar: Επόμενη κουλοχέρη",
"horizon.agent.connected.one": "Συνδεδεμένο: 1 σύνδεση πράκτορα",
"horizon.agent.connected.many": "Συνδεδεμένοι: %s συνδέσεις πρακτόρων",
"horizon.agent.connected.one_ago": "Συνδεδεμένο: 1 σύνδεση πράκτορα, τελευταία εντολή πριν από %s s",
"horizon.agent.connected.many_ago": "Συνδέθηκε: %s συνδέσεις πράκτορα, τελευταία εντολή %s πριν",
"horizon.agent.waiting": "Περιμένοντας έναν πράκτορα.",
"horizon.agent.off": "Off: οι πράκτορες δεν μπορούν να φτάσουν σε αυτό το παιχνίδι.",
"horizon.agent.session_opened": "Άνοιξε για αυτήν την περίοδο λειτουργίας από το πρόγραμμα που ξεκίνησε το παιχνίδι.",
"horizon.agent.socket": "Υποδοχή: %s (αντιγράψτε τα στοιχεία για την πλήρη διαδρομή του)",
"horizon.agent.local_only": "Μόνο τοπικά: πράκτορες σε αυτόν τον υπολογιστή, ποτέ στο δίκτυο.",
"%s nits": "%s κόνιδες",
"Auto (%s nits)": "Αυτόματο (%s nits)",
"%.2f nits": "%.2f κόνιδες",
"Hides models behind opaque blocks. Entities update. Off with custom packs.": "Κρύβει μοντέλα πίσω από αδιαφανή μπλοκ. Ενημέρωση οντοτήτων. Εκτός με προσαρμοσμένα πακέτα.",
"horizon.extras.repro_keys": "Συντομεύσεις εγγραφής",
"horizon.extras.repro_keys.tooltip": "Το F3+R ξεκινά ή σταματά μια επαναληπτική εγγραφή και το F3+E γράφει το πακέτο του. Απενεργοποίηση από προεπιλογή: μια εγγραφή αντιγράφει τον κόσμο.",
"horizon.agent.record_session": "Έναρξη εγγραφής συνεδρίας",
"horizon.agent.record_stop": "Διακοπή εγγραφής συνεδρίας",
"horizon.agent.export_repro": "Εξαγωγή Repro Bundle",
"horizon.repro.started": "Η εγγραφή ξεκίνησε. Το F3+R το σταματά και γράφει το bundle.",
"horizon.repro.stopped": "Η εγγραφή σταμάτησε: %s",
"horizon.repro.bundle": "Πακέτο Repro: %s",
"horizon.repro.no_recording": "Δεν υπάρχει ακόμα εγγραφή για εξαγωγή.",
"horizon.repro.replay_started": "Έναρξη επανάληψης: %s",
"horizon.pack.addInfo": "Προσθέστε ένα πακέτο πόρων από το Modrinth",
"horizon.pack.addWorking": "Ρωτώντας τον Modrinth...",
"horizon.pack.addNone": "Δεν βρέθηκαν πακέτα πόρων",
"horizon.pack.addTitle": "Προσθέστε ένα πακέτο πόρων",
"horizon.pack.install": "Εγκατάσταση",
"horizon.pack.installing": "Εγκατάσταση",
"horizon.pack.installed": "Εγκατεστημένο",
"horizon.pack.search": "Αναζήτηση",
"horizon.pack.searchHint": "Αναζήτηση στο Modrinth...",
"horizon.pack.filters": "Φίλτρα",
"horizon.pack.filter.realistic": "Ρεαλιστική",
"horizon.pack.filter.simplistic": "Απλουστευτική",
"horizon.pack.filter.vanillaLike": "Σαν βανίλια",
"horizon.pack.addFailed": "Δεν ήταν δυνατή η προσθήκη του πακέτου: %s",
"horizon.extras.header.cosmetics": "Καλλυντικά",
"horizon.extras.cosmetics_mine": "Τα καλλυντικά μου",
"horizon.extras.cosmetics_mine.tooltip": "Κρυφό: κάθε παίκτης του Horizon σας βλέπει χωρίς τα καλλυντικά σας, συμπεριλαμβανομένων εσείς. Ο ίδιος διακόπτης με την ντουλάπα του εκτοξευτή.",
"horizon.extras.cosmetics_others": "Καλλυντικά άλλων παικτών",
"horizon.extras.cosmetics_others.tooltip": "Τι φοράνε οι άλλοι παίκτες του Horizon: τα πάντα, μόνο τα στυλ των ετικετών τους ή τίποτα. Κρυφά, το παιχνίδι δεν ρωτά ποτέ τι φοράνε.",
"horizon.extras.cosmetics_auras": "Οι αύρες και τα μονοπάτια των άλλων",
"horizon.extras.cosmetics_auras.tooltip": "Αύρες και μονοπάτια φορούν άλλοι παίκτες. Απενεργοποίηση από προεπιλογή.",
"horizon.extras.cosmetics.shown": "Εμφανίζεται",
"horizon.extras.cosmetics.hidden": "Κρυφό",
"horizon.extras.cosmetics.name_tags": "Μόνο ετικέτες ονομάτων"
}
@@ -449,6 +449,8 @@
"How far around you BlueMap tiles are downloaded. Next join.": "How far around you BlueMap tiles are downloaded. Next join.",
"Synchronous": "Synchronous",
"Asynchronous": "Asynchronous",
"Hidden Faces": "Hidden Faces",
"Drops leaf faces behind two leaf layers: faster, same crowns.": "Drops leaf faces behind two leaf layers: faster, same crowns.",
"Solid": "Solid",
"Solid Aggressive": "Solid Aggressive",
"Hollow": "Hollow",
@@ -487,6 +489,10 @@
"horizon.splitscreen.profiles.online": "Microsoft online",
"horizon.splitscreen.account_unavailable": "%s is offline. Sign in again in the launcher, then restart the game.",
"horizon.splitscreen.account_expired": "%s’s Microsoft sign-in has expired. Sign in again in the launcher, then restart the game.",
"Particle Culling": "Particle Culling",
"Draws every particle.": "Draws every particle.",
"Skips offscreen, subpixel and terrain-hidden particles.": "Skips offscreen, subpixel and terrain-hidden particles.",
"Skips offscreen, subpixel and terrain-hidden particles with less render-thread work.": "Skips offscreen, subpixel and terrain-hidden particles with less render-thread work.",
"horizon.pack.add": "+",
"horizon.pack.addInfo": "Add a resource pack from Modrinth",
"horizon.pack.addWorking": "Asking Modrinth...",
@@ -199,6 +199,10 @@
"horizon.shader_options.open": "Opciones de sombreadores…",
"horizon.shader_options.profile": "Perfil",
"horizon.shader_options.loading": "Leyendo las opciones del paquete de sombreadores…",
"Particle Culling": "Particle Culling",
"Draws every particle.": "Draws every particle.",
"Skips offscreen, subpixel and terrain-hidden particles.": "Skips offscreen, subpixel and terrain-hidden particles.",
"Skips offscreen, subpixel and terrain-hidden particles with less render-thread work.": "Skips offscreen, subpixel and terrain-hidden particles with less render-thread work.",
"General": "General",
"Advanced": "Avanzado",
"Undo": "Deshacer",
@@ -376,6 +376,10 @@
"horizon.splitscreen.profiles.online": "Microsoft en ligne",
"horizon.splitscreen.account_unavailable": "%s est hors ligne. Reconnectez-vous dans le lanceur, puis redémarrez le jeu.",
"horizon.splitscreen.account_expired": "La connexion Microsoft de %s a expiré. Reconnectez-vous dans le lanceur, puis redémarrez le jeu.",
"Particle Culling": "Occlusion des particules",
"Draws every particle.": "Dessine toutes les particules.",
"Skips offscreen, subpixel and terrain-hidden particles.": "Ignore les particules hors écran, trop petites ou masquées par le terrain.",
"Skips offscreen, subpixel and terrain-hidden particles with less render-thread work.": "Ignore les particules hors écran, trop petites ou masquées par le terrain avec moins de travail sur le thread de rendu.",
"horizon.extras.header.cosmetics": "Cosmétiques",
"horizon.extras.cosmetics_mine": "Mes cosmétiques",
"horizon.extras.cosmetics_mine.tooltip": "Masqués : tous les joueurs Horizon vous voient sans vos cosmétiques, vous compris. Le même réglage que la garde-robe du launcher.",
@@ -0,0 +1,490 @@
{
"horizon.options.controller": "Controllore",
"horizon.options.vibration": "Vibrazione",
"horizon.options.adaptive_triggers": "Trigger adattivi",
"horizon.options.lightbar": "Barra luminosa",
"horizon.options.look_sensitivity": "Sensibilità visuale",
"horizon.options.invert_x": "Inverti visuale X",
"horizon.options.invert_y": "Inverti visuale Y",
"horizon.options.sneak_button": "Pulsante per accovacciarsi",
"horizon.options.move_deadzone": "Zona morta del movimento",
"horizon.options.look_deadzone": "Zona morta della visuale",
"horizon.options.button_glyphs": "Glifi dei pulsanti",
"horizon.options.menu_navigation": "Navigazione nel menu",
"horizon.options.on_screen_keyboard": "Tastiera su schermo",
"horizon.options.chat_delay": "Ritardo nella chat",
"horizon.options.lightbar.health": "Salute",
"horizon.options.lightbar.dimension": "Dimensione",
"horizon.options.glyphs.auto": "Automatico",
"horizon.options.menu_focus": "Concentrarsi",
"horizon.options.menu_pointer": "Puntatore",
"horizon.options.keyboard.auto": "Automatico",
"horizon.options.keyboard.steam": "Vapore",
"horizon.options.unavailable": "Questa funzionalità non è ancora disponibile in Horizon.",
"horizon.options.search": "Cerca impostazioni...",
"horizon.pages.mods": "Mod",
"horizon.pages.shader_packs": "Pacchetti shader",
"horizon.pages.shader_options": "Opzioni dello shader",
"horizon.pages.controller": "Impostazioni del controller",
"horizon.pages.controller_binds": "Il controller si lega",
"horizon.pages.extras": "Extra di Horizon",
"horizon.pages.settings": "Impostazioni di Horizon",
"horizon.pages.agent": "Agente dell'IA",
"horizon.split.leave": "Lascia",
"horizon.pages.split_settings": "Impostazioni schermo diviso",
"horizon.pages.split_profiles": "Chi sta giocando?",
"horizon.pages.split_setup": "Configurazione dello schermo diviso",
"horizon.pages.music": "Musica",
"horizon.pages.music.menu": "Menù",
"horizon.pages.music.overworld": "Sopramondo",
"horizon.pages.music.creative": "Creativo",
"horizon.pages.music.underwater": "Sott'acqua",
"horizon.pages.music.end": "La fine",
"horizon.pages.music.boss": "Capo",
"horizon.pages.music.credits": "Crediti",
"horizon.pages.music.overworld_biomes": "Biomi del mondo esterno",
"horizon.pages.music.nether_biomes": "Biomi inferiori",
"horizon.pages.music.end_biomes": "Fine dei biomi",
"horizon.pages.music.other": "Altra musica",
"horizon.pages.music.empty": "Nessuna traccia musicale: i suoni del gioco non vengono caricati.",
"horizon.pages.music.tooltip": "Le tracce integrate, in base alla situazione: riproducine una adesso o disattivane qualcuna in modo che il gioco smetta di selezionarla.",
"horizon.pages.settings.tooltip": "Impostazioni proprie di Horizon: grafica, controller, extra e mod.",
"horizon.pages.graphics.tooltip": "Grafica, semplicemente: ogni impostazione dice quanto costa.",
"horizon.pages.graphics_advanced.tooltip": "Ogni impostazione grafica, inclusa quella di Horizon, con il relativo costo.",
"horizon.pages.controller.tooltip": "Controller: pulsanti, levette, vibrazione e navigazione nei menu.",
"horizon.pages.extras.tooltip": "Aggiunte opzionali, tutte disattivate per impostazione predefinita: il gioco rimane vanilla finché non ne accendi uno.",
"horizon.pages.agent.tooltip": "Lascia che il tuo agente AI giochi: client Horizon-ctl e MCP su questo computer.",
"horizon.pages.split_profiles.tooltip": "Chi gioca: un profilo conservato in questa cartella del gioco.",
"horizon.pages.split_setup.tooltip": "Le finestre, i monitor e chi gioca dove.",
"horizon.pages.shader_packs.tooltip": "Pacchetti shader dalla cartella shaderpacks: quelli di Horizon e quelli nel formato shaders/. Si corre uno alla volta.",
"horizon.pages.mods.tooltip": "Mod realizzati per Horizon, dalla cartella Horizon-Mods. Ciascuno viene eseguito in una sandbox e rimane spento finché non lo accendi.",
"horizon.pages.open.graphics": "Grafica...",
"horizon.pages.open.graphics_advanced": "Grafica avanzata...",
"horizon.pages.open.shader_packs": "Pacchetti Shader...",
"horizon.pages.open.controller": "Impostazioni del controller...",
"horizon.pages.open.split_setup": "Schermo diviso...",
"horizon.pages.open.extras": "Extra...",
"horizon.pages.open.mods": "Mod...",
"horizon.pages.open.agent": "Agente dell'IA...",
"horizon.pages.open.horizon_graphics": "Grafica di Horizon...",
"horizon.pages.open.controller_binds": "Il controller si lega...",
"horizon.pages.open.horizon_settings": "Impostazioni di Horizon...",
"horizon.pages.open.music": "Musica...",
"horizon.mods.empty": "Nessuna mod: inserisci i file .hmod nella cartella Horizon-Mods",
"horizon.mods.stopped": " (Fermato)",
"horizon.mods.not_built": " (Non costruito)",
"horizon.mods.dev": " (Sviluppo)",
"horizon.mods.settings": "Impostazioni",
"horizon.mods.in_world": " (lasciare che il mondo cambi)",
"horizon.mods.open_folder": "Apri la cartella Mod",
"horizon.shader_packs.empty": "Nessun pacchetto shader: inseriscili nella cartella shaderpacks",
"horizon.shader_options.open": "Opzioni shader...",
"horizon.shader_options.profile": "Profilo",
"horizon.shader_options.loading": "Leggendo le opzioni del pacchetto shader...",
"horizon.agent.copy_details": "Copia i dettagli della connessione",
"horizon.multiplayer.join": "Partecipa",
"horizon.multiplayer.cancel_reconnecting": "Annulla riconnessione",
"horizon.multiplayer.join_friend": "Unisciti a un amico",
"horizon.multiplayer.invite_code": "Codice invito",
"horizon.multiplayer.relay": "Relè (opzionale)",
"Preset": "Preimpostato",
"LOD Distance": "Distanza LOD",
"Far Detail": "Dettaglio lontano",
"Cave Culling": "Abbattimento delle caverne",
"Entity Culling": "Eccitazione di entità",
"Chunk Updates": "Aggiornamenti a blocchi",
"Upload Budget": "Carica budget",
"Sky": "Cielo",
"Fog": "Nebbia",
"Weather": "Meteo",
"Animated Textures": "Texture animate",
"Present Mode": "Modalità presente",
"Frame Pacing": "Ritmo dei fotogrammi",
"Worker Threads": "Discussioni sui lavoratori",
"Resolution Scale": "Scala di risoluzione",
"Anti-aliasing": "Anti-alias",
"Paper White": "Carta Bianca",
"Peak Brightness": "Luminosità massima",
"Black Level": "Livello nero",
"UI Brightness": "Luminosità dell'interfaccia utente",
"Battery Mode": "Modalità batteria",
"Graphics API": "API grafica",
"Translucent Batching": "Dosaggio traslucido",
"Performance Overlay": "Sovrapposizione delle prestazioni",
"Full Detail Distance": "Distanza dettagliata completa",
"On": "Su",
"Off": "Spento",
"Unlimited": "Illimitato",
"Auto": "Automatico",
"Custom": "Personalizzato",
"Performance": "Prestazioni",
"Balanced": "Equilibrato",
"Quality": "Qualità",
"Ultra Performance": "Prestazioni ultra",
"Native": "Nativo",
"Full": "Pieno",
"Reduced": "Ridotto",
"Efficient": "Efficiente",
"Precise": "Preciso",
"Auto (VSync)": "Automatico (sincronizzazione verticale)",
"Mailbox": "Cassetta postale",
"Immediate": "Immediato",
"Vulkan": "Vulcano",
"DirectX 12": "DirectX12",
"FPS and Graph": "FPS e grafico",
"TAA": "TAAA",
"No cost": "Nessun costo",
"Low cost": "Basso costo",
"Medium cost": "Costo medio",
"High cost": "Costo elevato",
"Saves time": "Risparmia tempo",
"Graphics": "Grafica",
"Done": "Fatto",
"This feature is not yet available in Horizon.": "Questa funzionalità non è ancora disponibile in Horizon.",
"Your display or system doesn't offer HDR output.": "Il tuo display o sistema non offre l'uscita HDR.",
"Turn HDR on to use it.": "Attiva l'HDR per usarlo.",
"Your GPU or graphics API doesn't support it.": "La tua GPU o API grafica non lo supporta.",
"%s chunks": "%s pezzi",
"%s per frame": "%s per fotogramma",
"%s MiB/frame": "%s MiB/fotogramma",
"%s KiB/frame": "%s KiB/telaio",
"Auto (%s)": "Automatico (%s)",
"Full-detail terrain range. LOD Distance can extend local worlds farther.": "Gamma di terreno dettagliata. LOD La distanza può estendere ulteriormente i mondi locali.",
"Coarse distant terrain in local worlds. Integrated GPUs stop at 128 chunks.": "Terreni distanti e grossolani nei mondi locali. Le GPU integrate si fermano a 128 blocchi.",
"Reduced draws far terrain coarser: faster on this integrated GPU.": "Ridotti disegna terreni lontani più ruvidi: più veloce su questa GPU integrata.",
"Reduced draws far terrain coarser, for GPUs it slows down.": "Il ridotto disegna terreni lontani più grossolani, per le GPU rallenta.",
"Field of view. Wider shows more terrain at once.": "Campo visivo. Più ampio mostra più terreno contemporaneamente.",
"Caps frames per second; a cap saves power and heat.": "Limita i fotogrammi al secondo; un cappuccio consente di risparmiare energia e calore.",
"Waits for the display's refresh: no tearing, a little latency.": "Attende il refresh del display: niente strappi, poca latenza.",
"Size of menus and the HUD.": "Dimensioni dei menu e dell'HUD.",
"Sets the options below together. Changing one makes it Custom.": "Imposta insieme le opzioni seguenti. Cambiarne uno lo rende personalizzato.",
"Lava, fire and sunlight shine brighter than white. Needs an HDR display.": "La lava, il fuoco e la luce del sole brillano più del bianco. Necessita di un display HDR.",
"Your display's darkest black. 0 for OLED; LCDs glow a little.": "Il tuo display è nero più scuro. 0 per OLED; Gli LCD si illuminano leggermente.",
"How bright highlights get. Auto: the peak your system reports.": "Come diventano brillanti le luci. Auto: il picco segnalato dal sistema.",
"How bright white paper and menus look. Auto: your desktop's white.": "Come appaiono la carta bianca e i menu. Auto: il tuo desktop è bianco.",
"How bright the HUD and menus are, against paper white.": "Quanto sono luminosi l'HUD e i menu, rispetto al bianco della carta.",
"How far mobs, crops and machines keep working. CPU time.": "Fino a che punto mob, raccolti e macchine continuano a funzionare. Tempo della CPU.",
"How far away mobs and items are drawn, as a share of normal.": "Quanto lontano vengono disegnati mob e oggetti, come percentuale del normale.",
"Skips terrain hidden behind closed sections. Off costs a lot.": "Salta il terreno nascosto dietro le sezioni chiuse. Spendere costa molto.",
"Hides entities behind opaque blocks.": "Nasconde le entità dietro blocchi opachi.",
"No entity occlusion culling.": "Nessuna selezione per l'occlusione delle entità.",
"CPU occlusion test runs this frame.": "Il test di occlusione della CPU esegue questo frame.",
"Occlusion checks run on a worker thread.": "I controlli di occlusione vengono eseguiti su un thread di lavoro.",
"Meshed sections uploaded per frame. Lower is smoother while loading.": "Sezioni mesh caricate per fotogramma. La parte inferiore è più fluida durante il caricamento.",
"Soft shadows in corners. Costs chunk building time only.": "Ombre morbide negli angoli. Costa solo tempo per la costruzione del blocco.",
"Smaller copies of block textures for distant terrain: less shimmer.": "Copie più piccole di texture a blocchi per terreni distanti: meno luccichio.",
"Blends grass and water colours across biomes when building chunks.": "Unisce i colori dell'erba e dell'acqua nei biomi durante la costruzione dei blocchi.",
"Cloud layer: off, flat (fast) or 3D (fancy).": "Livello nuvola: disattivato, piatto (veloce) o 3D (fantasioso).",
"How far clouds reach, in chunks.": "Quanto lontano arrivano le nuvole, in blocchi.",
"Draws the sky, sun, moon and stars.": "Disegna il cielo, il sole, la luna e le stelle.",
"Distance fog. Off shows the edge of the loaded world.": "Nebbia a distanza. Off mostra il limite del mondo caricato.",
"Draws rain and snow.": "Attira pioggia e neve.",
"How far rain and snow fall around you.": "Quanta pioggia e neve cadono intorno a te.",
"How many particles effects spawn.": "Quanti effetti particellari vengono generati.",
"Round shadows under mobs and items.": "Ombre rotonde sotto mob e oggetti.",
"Leaves with see-through gaps. Off draws them solid.": "Foglie con spazi trasparenti. Off li attira solidi.",
"Sorts water and glass more exactly behind each other.": "Ordina l'acqua e il bicchiere in modo più preciso uno dietro l'altro.",
"Which chunk rebuilds wait for the frame: none, nearby or yours.": "Quale pezzo ricostruito attende il frame: nessuno, nelle vicinanze o il tuo.",
"Animates water, lava, fire and other moving textures.": "Anima acqua, lava, fuoco e altre texture in movimento.",
"World pixels per screen pixel. Below 100% is faster on the GPU.": "Pixel mondiali per pixel dello schermo. Sotto il 100% la GPU è più veloce.",
"Smooths jagged edges. FXAA: softer. TAA: smoothest, moving things may trail.": "Leviga i bordi frastagliati. FXAA: più morbido. TAA: le cose più fluide e in movimento possono trascinarsi.",
"Renders the world smaller and rebuilds it with TAA. Faster, softer.": "Rende il mondo più piccolo e lo ricostruisce con TAA. Più veloce, più morbido.",
"HDR output on an HDR display: lava, fire and sunlight shine brighter.": "Uscita HDR su un display HDR: lava, fuoco e luce solare brillano più luminosi.",
"How frames reach the screen while VSync is off.": "In che modo i frame raggiungono lo schermo mentre VSync è disattivato.",
"Efficient sleeps until the next frame; Precise spins, like vanilla.": "Sonni efficienti fino al fotogramma successivo; Rotazioni precise, come la vaniglia.",
"Fills the screen (borderless).": "Riempie lo schermo (senza bordi).",
"Brightens dark places.": "Illumina i luoghi bui.",
"Lowers the frame rate when minimised, or idle too.": "Riduce il frame rate quando è ridotto al minimo o anche inattivo.",
"Sways the view while walking.": "Oscilla la vista mentre si cammina.",
"Fades newly loaded chunks in.": "Dissolve i blocchi appena caricati.",
"Darkens the screen's edges.": "Scurisce i bordi dello schermo.",
"Shows when the world saves.": "Mostra quando il mondo salva.",
"Shows attack cooldown.": "Mostra il tempo di recupero dell'attacco.",
"60 FPS cap (30 in menus or unfocused), half the workers: less power.": "Limite di 60 FPS (30 nei menu o senza messa a fuoco), metà dei lavoratori: meno energia.",
"Threads that generate, light and mesh chunks. Next start.": "Fili che generano, accendono e intrecciano spezzoni. Prossimo inizio.",
"Vulkan, then DirectX 12 (Windows) or OpenGL (Linux) where it fails. Next start.": "Vulkan, quindi DirectX 12 (Windows) o OpenGL (Linux) dove fallisce. Prossimo inizio.",
"Water and glass in one buffer: fewer draw calls, a bit more VRAM. Next start.": "Acqua e vetro in un unico buffer: meno chiamate, un po' più di VRAM. Prossimo inizio.",
"Mesh data sent to the GPU per frame. Lower is smoother while loading.": "Dati mesh inviati alla GPU per frame. La parte inferiore è più fluida durante il caricamento.",
"Frame rate and frame times over the game, with a graph.": "Frequenza fotogrammi e durata dei fotogrammi durante il gioco, con un grafico.",
"horizon.multiplayer.finding_friend": "Trovare il mondo del tuo amico...",
"horizon.multiplayer.not_signed_in": "Questo server è in modalità online. Accedi con il tuo account Microsoft nel launcher Horizon per iscriverti.",
"horizon.multiplayer.invalid_address": "Indirizzo del server non valido: %s",
"horizon.multiplayer.connected_friend_direct": "Collegato direttamente al tuo amico...",
"horizon.multiplayer.connected_friend_relay": "Connesso al tuo amico tramite il relè...",
"General": "Generale",
"Advanced": "Avanzato",
"Undo": "Annulla",
"Search options": "Opzioni di ricerca",
"Shortcut": "Scorciatoia",
"Distance": "Distanza",
"Display": "Visualizzazione",
"Interface": "Interfaccia",
"Sky and weather": "Cielo e tempo",
"Lighting and entities": "Illuminazione ed entità",
"Textures": "Trame",
"Image": "Immagine",
"Chunk loading": "Caricamento di blocchi",
"Culling": "Abbattimento",
"Power": "Potenza",
"Frames": "Cornici",
"Overlay": "Sovrapposizione",
"Output": "Uscita",
"Brightness": "Luminosità",
"How far you see, the window and the HUD.": "Quanto lontano vedi, la finestra e l'HUD.",
"The sky and weather, lighting, textures and the image.": "Il cielo e il tempo, l'illuminazione, le trame e l'immagine.",
"Chunk loading, culling and power use.": "Caricamento di blocchi, selezione e consumo di energia.",
"How frames reach the screen, and the performance overlay.": "Come i fotogrammi raggiungono lo schermo e la sovrapposizione delle prestazioni.",
"Brighter-than-white output on an HDR display.": "Uscita più luminosa del bianco su un display HDR.",
"Results for \"%s\"": "Risultati per \"%s\"",
"No settings match.": "Nessuna impostazione corrisponde.",
"horizon.title.not_affiliated": "Non affiliato con Mojang o Microsoft",
"horizon.extras.header.lighting": "Illuminazione",
"horizon.extras.header.third_person": "Terza persona",
"horizon.extras.header.particles": "Particelle",
"horizon.extras.header.inventory": "Inventario",
"horizon.extras.header.chat": "Chatta",
"horizon.extras.header.multiplayer": "Multigiocatore",
"horizon.extras.header.sound": "Suono",
"horizon.extras.header.menus": "Menù",
"horizon.extras.fullbright": "Piena luminosità",
"horizon.extras.dynamic_lights": "Luci dinamiche",
"horizon.extras.own_name_tag": "Proprio cartellino con il nome",
"horizon.extras.hide_block_particles": "Nascondi le particelle di rottura del blocco",
"horizon.extras.auto_reconnect": "Riconnessione automatica",
"horizon.extras.ui_sound_reserve": "Mantieni i canali per i suoni dell'interfaccia utente",
"horizon.extras.music_page": "Pagina Musica",
"horizon.extras.mouse_tweaks": "Controlli per le modifiche del mouse",
"horizon.extras.mouse_tweaks_wheel": "La rotella di scorrimento sposta gli elementi",
"horizon.extras.sort": "Ordina i pulsanti",
"horizon.extras.sort_key": "Chiave di ordinamento",
"horizon.extras.no_ai": "Nessuna intelligenza artificiale",
"horizon.extras.agent_control": "Controllo degli agenti",
"horizon.extras.discord_presence": "Presenza ricca di discordia",
"horizon.extras.splitscreen": "Schermo diviso",
"horizon.extras.chat_animation": "Chiacchierata fluida",
"horizon.extras.chat_indicator": "Indicatore di messaggio",
"horizon.extras.wheel_cycles_settings": "La rotella di scorrimento modifica le impostazioni",
"horizon.extras.pack_browser": "Browser del pacchetto di risorse",
"horizon.extras.fullbright.tooltip": "Mostra blocchi ed entità in piena luce, anche nelle aree buie.",
"horizon.extras.dynamic_lights.tooltip": "Torce e altre fonti di luce tenute, lasciate cadere o in fiamme illuminano i blocchi attorno a loro.",
"horizon.extras.own_name_tag.tooltip": "Mostra il tuo nome sopra la tua testa in terza persona, così come lo vedono gli altri giocatori. Nascosto quando il server nasconde i nomi della tua squadra o sei invisibile.",
"horizon.extras.hide_block_particles.tooltip": "Nasconde le particelle di detriti che escono da un blocco rotto e si sbriciolano da quello che hai estratto. Altre particelle rimangono.",
"horizon.extras.auto_reconnect.tooltip": "Rientra in un server dopo una perdita di connessione o un riavvio, mai dopo un kick o un ban.",
"horizon.extras.ui_sound_reserve.tooltip": "I suoni nel mondo lasciano liberi 16 dei 247 canali audio, quindi un'ondata di essi (una grande esplosione) non può silenziare i clic dei menu.",
"horizon.extras.music_page.tooltip": "Musica e suoni hanno una pagina Musica...: riproduci subito qualsiasi traccia integrata o disattivane una in modo che il gioco smetta di selezionarla. Non cambia nulla finché non disattivi una traccia.",
"horizon.extras.mouse_tweaks.tooltip": "Il trascinamento con il tasto destro ne posiziona uno per slot, il trascinamento con il tasto sinistro raccoglie l'oggetto trattenuto, Maiusc + il trascinamento con il tasto sinistro sposta ogni slot.",
"horizon.extras.mouse_tweaks_wheel.tooltip": "Giù manda un oggetto dello slot dall'altra parte, su ne riporta uno indietro.",
"horizon.extras.sort.tooltip": "Ordina l'inventario, i forzieri, i barili, i forzieri finali e le scatole degli shulker in un ordine di schede creativo, unendo le pile.",
"horizon.extras.sort_key.tooltip": "Ordina la parte sotto il cursore. Fare clic, quindi premere un tasto; La fuga lo scioglie.",
"horizon.extras.no_ai.tooltip": "Nasconde e disattiva ogni funzionalità AI: controllo agente, Horizon-ctl e server MCP. Anche l'interruttore del launcher.",
"horizon.extras.agent_control.tooltip": "Il tuo agente AI può giocare a questo gioco tramite Horizon-ctl o un client MCP, solo su questo computer.",
"horizon.extras.discord_presence.tooltip": "Mostra Playing Horizon sul tuo profilo Discord mentre Discord è in esecuzione: menu, giocatore singolo o multiplayer, la dimensione e il tempo giocato. Mai il nome di un mondo o l'indirizzo di un server.",
"Calibrate...": "Calibra...",
"Calibrate Anyway...": "Calibra comunque...",
"Use Automatic Setup": "Utilizza l'impostazione automatica",
"Shortcut: %s": "Scorciatoia: %s",
"Next": "Avanti",
"HDR Calibration %s/%s: %s": "Calibrazione HDR %s/%s: %s",
"Sets the three below full screen, one test picture at a time.": "Imposta le tre immagini sottostanti a schermo intero, un'immagine di prova alla volta.",
"A key that opens this screen from the game. Not bound at first.": "Una chiave che apre questa schermata del gioco. All'inizio non legato.",
"Your display didn't say how bright it gets: calibrate to set it up.": "Il display non ha indicato la luminosità: calibralo per configurarlo.",
"Already set up for your display. Only calibrate if HDR looks wrong.": "Già predisposto per il tuo display. Calibrare solo se l'HDR sembra sbagliato.",
"Puts Peak Brightness and Paper White back to your display's setup.": "Riporta la luminosità di picco e il bianco della carta alla configurazione del display.",
"Set up for your display. Leave on Auto unless it looks wrong.": "Configura per il tuo display. Lasciare su Auto a meno che non sembri sbagliato.",
"Lower it until the logo just disappears into the black.": "Abbassalo finché il logo non scompare nel nero.",
"Raise it until the logo just disappears into the bright square.": "Sollevalo finché il logo non scompare nel quadrato luminoso.",
"Make the card a white that's comfortable to look at for a long time, in the light you play in.": "Rendi la carta bianca, comoda da guardare a lungo, nella luce in cui giochi.",
"horizon.splitscreen.profiles.forget": "Dimentica",
"horizon.splitscreen.profiles.create": "Crea",
"horizon.splitscreen.profiles.you": " - tu",
"horizon.splitscreen.profiles.forget_named": "Dimentica %s",
"horizon.splitscreen.profiles.previous": "Precedente",
"horizon.splitscreen.profiles.next": "Avanti",
"horizon.splitscreen.profiles.new_button": "Nuovo profilo...",
"horizon.splitscreen.profiles.forget_title": "Dimentica il profilo?",
"horizon.splitscreen.profiles.forget_leaves": "Esce dall'elenco di questa istanza.",
"horizon.splitscreen.profiles.forget_kept": "I progressi e le impostazioni del mondo vengono mantenuti.",
"horizon.splitscreen.profiles.new_title": "Nuovo profilo",
"horizon.splitscreen.profiles.name_hint": "Nome (da 3 a 16 lettere, cifre, _)",
"horizon.splitscreen.profiles.switch_title": "Cambia profilo",
"horizon.splitscreen.profiles.offline_note": "I profili offline appartengono a questa istanza",
"horizon.splitscreen.profiles.move": "Muoviti dove giochi",
"horizon.splitscreen.profiles.move_place": "Spostati dove giochi: %s",
"horizon.friends.title": "Gioca con gli amici",
"horizon.friends.hint": "Gli amici incollano il codice dopo il pulsante Amici della schermata del titolo, in Connessione diretta o nella pagina di riproduzione del launcher.",
"horizon.friends.copied": "Copiato",
"horizon.friends.copy_code": "Copia codice",
"horizon.friends.stop_sharing": "Interrompi la condivisione",
"horizon.friends.none_yet": "Nessun amico qui ancora.",
"horizon.friends.here_now": "Ecco adesso: %s",
"horizon.friends.share_intro": "Condividi questo mondo dietro un codice di invito: si apre alla LAN e gli amici su Internet si uniscono con il codice. Nessun nostro server è coinvolto.",
"horizon.friends.start_sharing": "Inizia a condividere",
"horizon.friends.troubleshooting": "Risoluzione dei problemi...",
"horizon.friends.stopped": "Interrotta la condivisione del codice di invito.",
"horizon.friends.short_code_changed": "Qualcuno continuava a provare un codice funzione sbagliato, quindi è cambiato.",
"horizon.friends.wrong_code": "Qualcuno ha provato un codice sbagliato.",
"horizon.friends.code_ready": "Il tuo codice di invito è pronto: Menu di gioco, Gioca con gli amici. Copialo e invialo ai tuoi amici.",
"horizon.friends.share_failed": "Impossibile condividere il mondo: %s",
"horizon.friends.finding_route": "Scoprire come gli amici possono contattarti...",
"horizon.osk.shift": "Cambio",
"horizon.osk.space": "Spazio",
"horizon.osk.delete": "Elimina",
"horizon.osk.type": "Digitare",
"horizon.osk.symbols": "Simboli",
"horizon.osk.close": "Chiudi",
"horizon.extras.chat_animation.tooltip": "Una nuova linea di chat scorre da sinistra mentre si dissolve, invece di apparire intera.",
"horizon.extras.chat_indicator.tooltip": "La barra colorata a sinistra di una chat line.",
"horizon.extras.wheel_cycles_settings.tooltip": "La rotella di scorrimento sopra un pulsante nelle impostazioni ne modifica il valore, come in Vanilla. Spento, la rotella scorre solo l'elenco.",
"horizon.extras.pack_browser.tooltip": "Seleziona pacchetti di risorse ottiene un pulsante Aggiungi che cerca Modrinth e installa un pacchetto nella cartella dei pacchetti. Spento, il gioco non contatta mai Modrinth.",
"horizon.extras.splitscreen.tooltip": "In un mondo, un altro controller può unirsi come nuovo giocatore: premi A quando richiesto, quindi scegli un profilo e dove giocare.",
"horizon.splitscreen.setup.monitor": "Monitorare %s",
"horizon.splitscreen.setup.monitor_unknown": "un monitor",
"horizon.splitscreen.setup.window": "Finestra %s",
"horizon.splitscreen.setup.new_window": "Nuova finestra",
"horizon.splitscreen.setup.fill_monitor": "Riempi %s",
"horizon.splitscreen.setup.done": "Fatto",
"horizon.splitscreen.setup.on": "Su",
"horizon.splitscreen.setup.off": "Spento",
"horizon.splitscreen.setup.player": "Giocatore %s",
"horizon.splitscreen.setup.revert": "Ripristina",
"horizon.splitscreen.setup.apply": "Applicare",
"horizon.splitscreen.setup.warning.empty_main": "Nessuno gioca nella Finestra 1: si nasconde",
"horizon.splitscreen.setup.warning.empty_close": "Nessuno gioca nella finestra %s: si chiude su Applica",
"horizon.splitscreen.setup.warning.empty_new": "Nessuno gioca nella Finestra %s: non si apre",
"horizon.splitscreen.setup.warning.on_main": "La finestra %s riempie il monitor della Finestra 1: i suoi giocatori giocano nella Finestra 1",
"horizon.splitscreen.setup.warning.unplugged": "Il monitor della Finestra %s non è collegato: i suoi giocatori giocano nella Finestra 1",
"horizon.splitscreen.setup.status.off": "Lo schermo diviso è disattivato.",
"horizon.splitscreen.setup.status.enable_hint": "Accendilo, quindi premi un pulsante su un altro controller in un mondo.",
"horizon.splitscreen.setup.status.join_hint": "Premi A per iscriverti e scegliere un profilo.",
"horizon.splitscreen.setup.status.idle": "Schermo diviso inattivo",
"horizon.splitscreen.setup.status.alone": "Nessun altro giocatore locale.",
"horizon.splitscreen.setup.status.solo_controls": "I controlli Solo e il feedback del controller rimangono invariati.",
"horizon.splitscreen.setup.window_empty": "Finestra %s: vuota",
"horizon.splitscreen.setup.note.select": "Fai clic su un giocatore o trascinalo su una finestra o su un monitor.",
"horizon.splitscreen.setup.note.apply": "Applica per giocare in questo modo, Ripristina per annullare.",
"horizon.splitscreen.setup.note.place": "Dove dovrebbe giocare %s?",
"horizon.splitscreen.setup.this_player": "questo giocatore",
"horizon.splitscreen.setup.switch_disabled": "Lo schermo diviso si spegne una volta che gli altri se ne sono andati (il loro menu di pausa).",
"horizon.splitscreen.setup.window_place": "Finestra %s (%s di %s)",
"horizon.splitscreen.setup.names": "Nomi",
"horizon.splitscreen.setup.identify": "Identificare",
"horizon.splitscreen.setup.layout.two": "2 condivisione: %s",
"horizon.splitscreen.setup.layout.three": "3 condivisione: %s",
"horizon.splitscreen.setup.layout.two.0": "Automatico",
"horizon.splitscreen.setup.layout.two.1": "Fianco a fianco",
"horizon.splitscreen.setup.layout.two.2": "Sopra e sotto",
"horizon.splitscreen.setup.layout.three.0": "Uno largo in alto",
"horizon.splitscreen.setup.layout.three.1": "Uno alto a sinistra",
"horizon.splitscreen.setup.layout.three.2": "Fianco a fianco",
"horizon.splitscreen.setup.help.player": "Fai clic o trascina %s per spostarli.",
"horizon.splitscreen.setup.help.layout_auto": "%s (affiancati quando la finestra è ampia). Premere per modificare.",
"horizon.splitscreen.setup.help.layout": "%s. Premere per modificare.",
"horizon.splitscreen.setup.help.switch": "Schermo diviso per questo computer, attivato o disattivato.",
"horizon.splitscreen.setup.help.identify": "La vista di ogni giocatore mostra in quale finestra si trova.",
"horizon.splitscreen.setup.help.names": "Il nome di ogni giocatore nell'angolo della vista.",
"horizon.splitscreen.setup.help.revert": "Annulla le modifiche non ancora applicate.",
"horizon.splitscreen.setup.help.apply": "Gioca come mostra la mappa.",
"horizon.splitscreen.setup.help.unchanged": "Non è cambiato ancora nulla.",
"horizon.splitscreen.setup.give_up_pad": "Rinunciare Pad",
"horizon.splitscreen.prompt.controller_connected": "Controller collegato",
"horizon.splitscreen.prompt.controller_disconnected": "Controller disconnesso",
"horizon.splitscreen.prompt.controller_disconnected.hint": "Ricollegalo o premi un pulsante su un altro",
"horizon.splitscreen.prompt.join.one": "%s vuole unirsi",
"horizon.splitscreen.prompt.join.many": "%s controllori vogliono unirsi",
"horizon.splitscreen.prompt.join.yes": "Partecipa",
"horizon.splitscreen.prompt.join.as_p1": "Gioca come P1",
"horizon.splitscreen.prompt.lost": "%s: controller disconnesso",
"horizon.splitscreen.prompt.lost.use_another": "Usane un altro",
"horizon.splitscreen.prompt.lost.leave": "Lascia",
"horizon.splitscreen.setup.help.give_up_pad": "Il tuo controller smette di guidarti e gli viene offerto di unirsi (A).",
"horizon.splitscreen.setup.note.held_at": "Da %s a %s: A la lascia qui, B la rimette a posto.",
"horizon.splitscreen.setup.note.held": "%s raccolto: sinistra/destra sceglie dove, A lascia cadere, B lo rimette a posto.",
"Hides models behind opaque blocks. Async checks off-thread; entities tick.": "Nasconde i modelli dietro blocchi opachi. Async controlla fuori thread; le entità spuntano.",
"Block Entities": "Blocca entità",
"Shulker Boxes": "Scatole Shulker",
"Reuses settled boxes; lid movement stays animated.": "Riutilizza le scatole depositate; il movimento del coperchio rimane animato.",
"Signs": "Segni",
"Reuses sign text until text, light, or font changes.": "Riutilizza il testo del segno finché il testo, la luce o il carattere non cambiano.",
"Decorated Pots": "Vasi decorati",
"Reuses still pots; break wobble and sherd changes redraw.": "Riutilizza i vasi fermi; rompi l'oscillazione e le modifiche del frammento vengono ridisegnate.",
"Bells": "Campane",
"Reuses still bells; ringing stays animated.": "Riutilizza ancora le campane; lo squillo rimane animato.",
"Chests": "Forzieri",
"Reuses closed chests; moving lids stay animated.": "Riutilizza i bauli chiusi; le palpebre mobili rimangono animate.",
"Banners": "Banner",
"Reuses poles; flags and pattern layers still update.": "Riutilizza i pali; le bandiere e i livelli di pattern continuano ad essere aggiornati.",
"Copper Golem Statues": "Statue Golem di rame",
"Reuses statue geometry until its block state changes.": "Riutilizza la geometria della statua finché il suo stato di blocco non cambia.",
"Leaf Culling": "Abbattimento delle foglie",
"Every leaf face. Vanilla's fancy leaves.": "Ogni faccia della foglia. Le foglie fantasia della vaniglia.",
"Distant Plant Dither": "Il tremore delle piante lontane",
"Keeps fine plants in high-res packs from fading far away.": "Impedisce alle piante pregiate in confezioni ad alta risoluzione di sbiadire in lontananza.",
"Screenshot Quality": "Qualità dello schermo",
"F2 screenshots at this many times the game's resolution. Higher takes longer.": "Screenshot F2 con una risoluzione pari a molte volte quella del gioco. Più alto richiede più tempo.",
"Frame Generation": "Generazione di fotogrammi",
"Shows a made-up frame between each two real ones: smoother, a little more lag.": "Mostra un fotogramma inventato tra ciascuno dei due fotogrammi reali: più fluido, con un po' più di ritardo.",
"Shadow Cache": "Cassa dell'Ombra",
"Reuses the pack shadow map when sun, view and world match. Off by default.": "Riutilizza la mappa delle ombre del pacchetto quando sole, vista e mondo corrispondono. Disattivato per impostazione predefinita.",
"Find BlueMap": "Trova BlueMap",
"On servers, finds their BlueMap web map for far terrain. Next join.": "Sui server, trova la mappa web BlueMap per terreni lontani. Prossima partecipazione.",
"BlueMap Radius": "Raggio BlueMap",
"How far around you BlueMap tiles are downloaded. Next join.": "La distanza intorno a te in cui vengono scaricate le tessere BlueMap. Prossima partecipazione.",
"Synchronous": "Sincrono",
"Asynchronous": "Asincrono",
"Solid": "Solido",
"Solid Aggressive": "Solido aggressivo",
"Hollow": "Vuoto",
"Leaves fully inside a canopy draw solid: fewer see-through layers.": "Le foglie completamente all'interno della chioma diventano solide: meno strati trasparenti.",
"Leaves with one open side draw solid too: faster, chunkier edges.": "Anche le foglie con un lato aperto disegnano solidi: bordi più veloci e più grossi.",
"Drops faces between leaves: faster, but gaps look through.": "Gocce facce tra le foglie: più veloci, ma gli spazi traspare.",
"Hotbar: Previous Slot": "Barra di accesso rapido: slot precedente",
"Hotbar: Next Slot": "Barra di accesso rapido: slot successivo",
"horizon.agent.connected.one": "Connesso: 1 connessione agente",
"horizon.agent.connected.many": "Connesso: %s connessioni agente",
"horizon.agent.connected.one_ago": "Connesso: 1 connessione agente, ultimo comando %s s fa",
"horizon.agent.connected.many_ago": "Connesso: %s connessioni agente, ultimo comando %s s fa",
"horizon.agent.waiting": "In attesa di un agente.",
"horizon.agent.off": "Disattivato: gli agenti non possono raggiungere questo gioco.",
"horizon.agent.session_opened": "Aperto per questa sessione dal programma che ha avviato il gioco.",
"horizon.agent.socket": "Socket: %s (copia i dettagli per il percorso completo)",
"horizon.agent.local_only": "Solo locale: agenti su questo computer, mai sulla rete.",
"%s nits": "%s lendini",
"Auto (%s nits)": "Auto (%s nit)",
"%.2f nits": "%.2f lendini",
"Hides models behind opaque blocks. Entities update. Off with custom packs.": "Nasconde i modelli dietro blocchi opachi. Aggiornamento delle entità. Via con i pacchetti personalizzati.",
"horizon.extras.repro_keys": "Scorciatoie di registrazione",
"horizon.extras.repro_keys.tooltip": "F3+R avvia o interrompe una registrazione di riproduzione e F3+E scrive il suo bundle. Disattivato per impostazione predefinita: una registrazione copia il mondo.",
"horizon.agent.record_session": "Avvia la sessione di registrazione",
"horizon.agent.record_stop": "Interrompi la sessione di registrazione",
"horizon.agent.export_repro": "Esporta pacchetto di riproduzione",
"horizon.repro.started": "La registrazione è iniziata; F3+R lo ferma e scrive il bundle.",
"horizon.repro.stopped": "Registrazione interrotta: %s",
"horizon.repro.bundle": "Pacchetto riproduzione: %s",
"horizon.repro.error": "Riproduzione: %s",
"horizon.repro.no_recording": "Non c'è ancora alcuna registrazione da esportare.",
"horizon.repro.replay_started": "Replay iniziato: %s",
"horizon.pack.addInfo": "Aggiungi un pacchetto di risorse da Modrinth",
"horizon.pack.addWorking": "Chiedendo a Modrinth...",
"horizon.pack.addNone": "Nessun pacchetto di risorse trovato",
"horizon.pack.addTitle": "Aggiungi un pacchetto di risorse",
"horizon.pack.install": "Installa",
"horizon.pack.installing": "Installazione",
"horizon.pack.installed": "Installato",
"horizon.pack.search": "Cerca",
"horizon.pack.searchHint": "Cerca Modrinth...",
"horizon.pack.filters": "Filtri",
"horizon.pack.filter.realistic": "Realistico",
"horizon.pack.filter.simplistic": "Semplicistico",
"horizon.pack.filter.vanillaLike": "Simile alla vaniglia",
"horizon.pack.addFailed": "Impossibile aggiungere il pacchetto: %s",
"horizon.extras.header.cosmetics": "Cosmetici",
"horizon.extras.cosmetics_mine": "I miei cosmetici",
"horizon.extras.cosmetics_mine.tooltip": "Nascosto: ogni giocatore di Horizon ti vede senza i tuoi cosmetici, incluso te. Lo stesso interruttore dell'armadio del lanciatore.",
"horizon.extras.cosmetics_others": "Cosmetici di altri giocatori",
"horizon.extras.cosmetics_others.tooltip": "Cosa indossano gli altri giocatori di Horizon: tutto, solo lo stile delle etichette con il nome o niente. Nascosto, il gioco non chiede mai cosa indossano.",
"horizon.extras.cosmetics_auras": "Aure e tracce degli altri",
"horizon.extras.cosmetics_auras.tooltip": "Aure e tracce indossate da altri giocatori. Disattivato per impostazione predefinita.",
"horizon.extras.cosmetics.shown": "Mostrato",
"horizon.extras.cosmetics.hidden": "Nascosto",
"horizon.extras.cosmetics.name_tags": "Solo targhette con nome"
}
@@ -0,0 +1,497 @@
{
"horizon.options.controller": "コントローラー",
"horizon.options.vibration": "振動",
"horizon.options.adaptive_triggers": "アダプティブトリガー",
"horizon.options.lightbar": "ライトバー",
"horizon.options.look_sensitivity": "視点感度",
"horizon.options.invert_x": "視点X反転",
"horizon.options.invert_y": "視点Y反転",
"horizon.options.sneak_button": "スニークボタン",
"horizon.options.move_deadzone": "移動のデッドゾーン",
"horizon.options.look_deadzone": "視点のデッドゾーン",
"horizon.options.button_glyphs": "ボタンのグリフ",
"horizon.options.menu_navigation": "メニューナビゲーション",
"horizon.options.on_screen_keyboard": "オンスクリーンキーボード",
"horizon.options.chat_delay": "チャットの遅延",
"horizon.options.lightbar.health": "健康",
"horizon.options.lightbar.dimension": "次元",
"horizon.options.glyphs.auto": "自動",
"horizon.options.glyphs.playstation": "プレイステーション",
"horizon.options.glyphs.nintendo": "任天堂",
"horizon.options.menu_focus": "フォーカス",
"horizon.options.menu_pointer": "ポインタ",
"horizon.options.keyboard.auto": "自動",
"horizon.options.keyboard.steam": "蒸気",
"horizon.options.unavailable": "この機能は Horizon ではまだ利用できません。",
"horizon.options.search": "検索設定...",
"horizon.pages.mods": "改造",
"horizon.pages.shader_packs": "シェーダーパック",
"horizon.pages.shader_options": "シェーダオプション",
"horizon.pages.controller": "コントローラーの設定",
"horizon.pages.controller_binds": "コントローラーのバインド",
"horizon.pages.extras": "Horizon エクストラ",
"horizon.pages.settings": "Horizon 設定",
"horizon.pages.agent": "AIエージェント",
"horizon.split.leave": "休暇を取る",
"horizon.pages.split_settings": "分割画面設定",
"horizon.pages.split_profiles": "誰が遊んでるの?",
"horizon.pages.split_setup": "分割画面のセットアップ",
"horizon.pages.music": "音楽",
"horizon.pages.music.menu": "メニュー",
"horizon.pages.music.overworld": "オーバーワールド",
"horizon.pages.music.creative": "クリエイティブ",
"horizon.pages.music.underwater": "水中",
"horizon.pages.music.end": "終わり",
"horizon.pages.music.boss": "ボス",
"horizon.pages.music.credits": "クレジット",
"horizon.pages.music.overworld_biomes": "オーバーワールドのバイオーム",
"horizon.pages.music.nether_biomes": "ネザーバイオーム",
"horizon.pages.music.end_biomes": "エンドバイオーム",
"horizon.pages.music.other": "その他の音楽",
"horizon.pages.music.empty": "音楽トラックがありません: ゲームのサウンドが読み込まれていません。",
"horizon.pages.music.tooltip": "状況別の内蔵トラック: 今すぐ 1 つを再生するか、ゲームが選択を停止するようにいずれかをオフにします。",
"horizon.pages.settings.tooltip": "Horizon 独自の設定: グラフィックス、コントローラー、エクストラ、MOD。",
"horizon.pages.graphics.tooltip": "グラフィックス、簡単に言うと、各設定にどれだけのコストがかかるかを示します。",
"horizon.pages.graphics_advanced.tooltip": "Horizon を含むすべてのグラフィック設定とそれぞれの費用。",
"horizon.pages.controller.tooltip": "コントローラー: ボタン、スティック、振動、メニュー ナビゲーション。",
"horizon.pages.extras.tooltip": "オプションの追加機能。デフォルトではすべてオフになっています。いずれかをオンにするまで、ゲームはバニラのままです。",
"horizon.pages.agent.tooltip": "独自の AI エージェントを実行します: このコンピューター上の Horizon-ctl クライアントと MCP クライアント。",
"horizon.pages.split_profiles.tooltip": "プレイする人: このゲーム フォルダーに保存されているプロフィール。",
"horizon.pages.split_setup.tooltip": "窓やモニター、そして誰がどこでプレイするか。",
"horizon.pages.shader_packs.tooltip": "shaderpacks フォルダーのシェーダー パック: Horizon 独自のものと、shaders/ 形式のもの。一度に 1 つずつ実行されます。",
"horizon.pages.mods.tooltip": "Horizon 用に作成された Mod (horizon-mods フォルダーから)。それぞれサンドボックス内で実行され、オンになるまでオフのままになります。",
"horizon.pages.open.graphics": "グラフィックス...",
"horizon.pages.open.graphics_advanced": "高度なグラフィックス...",
"horizon.pages.open.shader_packs": "シェーダーパック...",
"horizon.pages.open.controller": "コントローラー設定...",
"horizon.pages.open.split_setup": "画面分割...",
"horizon.pages.open.extras": "エクストラ...",
"horizon.pages.open.mods": "改造...",
"horizon.pages.open.agent": "AIエージェント...",
"horizon.pages.open.horizon_graphics": "Horizon グラフィックス...",
"horizon.pages.open.controller_binds": "コントローラーのバインド...",
"horizon.pages.open.horizon_settings": "Horizon 設定...",
"horizon.pages.open.music": "音楽...",
"horizon.mods.empty": "MODなし: .hmodファイルをhorizon-modsフォルダーに置きます",
"horizon.mods.stopped": " (停止中)",
"horizon.mods.not_built": " (構築されていません)",
"horizon.mods.dev": " (開発)",
"horizon.mods.settings": "設定",
"horizon.mods.in_world": " (世界の変化に任せて)",
"horizon.mods.open_folder": "Modフォルダーを開く",
"horizon.shader_packs.empty": "シェーダー パックはありません。シェーダー パック フォルダーに入れてください。",
"horizon.shader_options.open": "シェーダオプション...",
"horizon.shader_options.profile": "プロフィール",
"horizon.shader_options.loading": "シェーダー パックのオプションを読んでいます...",
"horizon.agent.copy_details": "接続詳細のコピー",
"horizon.multiplayer.join": "参加する",
"horizon.multiplayer.cancel_reconnecting": "再接続のキャンセル",
"horizon.multiplayer.join_friend": "友達に加わる",
"horizon.multiplayer.invite_code": "招待コード",
"horizon.multiplayer.relay": "リレー(オプション)",
"Preset": "プリセット",
"LOD Distance": "LOD距離",
"Far Detail": "遠くの詳細",
"Cave Culling": "洞窟の淘汰",
"Entity Culling": "エンティティのカリング",
"Chunk Updates": "チャンクの更新",
"Upload Budget": "予算のアップロード",
"Sky": "空",
"Fog": "霧",
"Weather": "天気",
"Animated Textures": "アニメーションテクスチャ",
"Present Mode": "プレゼントモード",
"Frame Pacing": "フレームペーシング",
"Worker Threads": "ワーカースレッド",
"Resolution Scale": "解像度スケール",
"Anti-aliasing": "アンチエイリアシング",
"Upscaling": "アップスケーリング",
"Paper White": "ペーパーホワイト",
"Peak Brightness": "ピーク輝度",
"Black Level": "黒レベル",
"UI Brightness": "UIの明るさ",
"Battery Mode": "バッテリーモード",
"Graphics API": "グラフィックスAPI",
"Translucent Batching": "半透明のバッチ処理",
"Performance Overlay": "パフォーマンスオーバーレイ",
"Full Detail Distance": "全詳細距離",
"On": "オン",
"Off": "オフ",
"Unlimited": "無制限",
"Auto": "自動",
"Custom": "カスタム",
"Performance": "パフォーマンス",
"Balanced": "バランスの取れた",
"Quality": "品質",
"Ultra": "ウルトラ",
"Ultra Performance": "ウルトラパフォーマンス",
"Native": "ネイティブ",
"Full": "フル",
"Reduced": "減少",
"Efficient": "効率的",
"Precise": "正確な",
"Auto (VSync)": "自動 (垂直同期)",
"Mailbox": "メールボックス",
"Immediate": "即時",
"Vulkan": "バルカン",
"DirectX 12": "ダイレクトX12",
"FPS and Graph": "FPSとグラフ",
"No cost": "費用はかかりません",
"Low cost": "低コスト",
"Medium cost": "中コスト",
"High cost": "高コスト",
"Saves time": "時間を節約します",
"Graphics": "グラフィックス",
"Done": "完了",
"This feature is not yet available in Horizon.": "この機能は Horizon ではまだ利用できません。",
"Your display or system doesn't offer HDR output.": "お使いのディスプレイまたはシステムは HDR 出力を提供しません。",
"Turn HDR on to use it.": "HDR をオンにして使用します。",
"Your GPU or graphics API doesn't support it.": "GPU またはグラフィックス API はそれをサポートしていません。",
"%s chunks": "%s チャンク",
"%s per frame": "フレームあたり%s",
"%s MiB/frame": "%s MiB/フレーム",
"%s KiB/frame": "%s KiB/フレーム",
"Auto (%s)": "自動 (%s)",
"Full-detail terrain range. LOD Distance can extend local worlds farther.": "フルディテールの地形範囲。 LOD ディスタンスを使用すると、ローカル ワールドをさらに遠くに拡張できます。",
"Coarse distant terrain in local worlds. Integrated GPUs stop at 128 chunks.": "ローカルワールドの粗い遠くの地形。統合 GPU は 128 チャンクで停止します。",
"Reduced draws far terrain coarser: faster on this integrated GPU.": "遠くの地形の描画を減らすと、より粗く、この統合された GPU ではより速く描画されます。",
"Reduced draws far terrain coarser, for GPUs it slows down.": "縮小すると、遠くの地形の描画が粗くなり、GPU の場合は速度が低下します。",
"Field of view. Wider shows more terrain at once.": "視野。幅を広くすると、より多くの地形が一度に表示されます。",
"Caps frames per second; a cap saves power and heat.": "1 秒あたりのフレーム数を制限します。キャップは電力と熱を節約します。",
"Waits for the display's refresh: no tearing, a little latency.": "ディスプレイの更新を待ちます。ティアリングはありませんが、待ち時間は少しあります。",
"Size of menus and the HUD.": "メニューと HUD のサイズ。",
"Sets the options below together. Changing one makes it Custom.": "以下のオプションをまとめて設定します。どれかを変更するとカスタムになります。",
"Lava, fire and sunlight shine brighter than white. Needs an HDR display.": "溶岩、火、太陽光は白よりも明るく輝きます。 HDRディスプレイが必要です。",
"Your display's darkest black. 0 for OLED; LCDs glow a little.": "ディスプレイの中で最も暗い黒。 OLEDの場合は0。液晶が少し光ります。",
"How bright highlights get. Auto: the peak your system reports.": "ハイライトがどれだけ明るくなるか。自動: システムが報告するピーク。",
"How bright white paper and menus look. Auto: your desktop's white.": "白い紙とメニューがいかに明るく見えるか。自動: デスクトップが白になります。",
"How bright the HUD and menus are, against paper white.": "紙の白に対する HUD とメニューの明るさ。",
"How far mobs, crops and machines keep working. CPU time.": "暴徒、作物、機械がどこまで機能し続けるか。 CPU時間。",
"How far away mobs and items are drawn, as a share of normal.": "通常の割合として、Mob とアイテムが描画される距離。",
"Skips terrain hidden behind closed sections. Off costs a lot.": "閉じたセクションの後ろに隠れている地形をスキップします。オフには多額の費用がかかります。",
"Hides entities behind opaque blocks.": "エンティティを不透明なブロックの後ろに隠します。",
"No entity occlusion culling.": "エンティティ オクルージョン カリングはありません。",
"CPU occlusion test runs this frame.": "CPU オクルージョン テストはこのフレームを実行します。",
"Occlusion checks run on a worker thread.": "オクルージョン チェックはワーカー スレッドで実行されます。",
"Meshed sections uploaded per frame. Lower is smoother while loading.": "メッシュ化されたセクションはフレームごとにアップロードされます。ローディング時は下のほうがスムーズです。",
"Soft shadows in corners. Costs chunk building time only.": "コーナーの柔らかい影。チャンクの構築時間のみがかかります。",
"Smaller copies of block textures for distant terrain: less shimmer.": "遠くの地形のブロック テクスチャの小さいコピー: きらめきが少なくなります。",
"Blends grass and water colours across biomes when building chunks.": "チャンクを構築するときに、バイオーム全体で草と水の色をブレンドします。",
"Cloud layer: off, flat (fast) or 3D (fancy).": "クラウドレイヤー: オフ、フラット (高速) または 3D (ファンシー)。",
"How far clouds reach, in chunks.": "雲が塊ごとにどこまで届くか。",
"Draws the sky, sun, moon and stars.": "空、太陽、月、星を描きます。",
"Distance fog. Off shows the edge of the loaded world.": "距離霧。オフは、読み込まれたワールドの端を示します。",
"Draws rain and snow.": "雨と雪を描きます。",
"How far rain and snow fall around you.": "あなたの周囲に雨や雪がどれだけ降るのか。",
"How many particles effects spawn.": "パーティクル エフェクトのスポーン数。",
"Round shadows under mobs and items.": "Mob とアイテムの下の丸い影。",
"Leaves with see-through gaps. Off draws them solid.": "隙間が透けて見える葉。オフではしっかりと描画されます。",
"Sorts water and glass more exactly behind each other.": "水とガラスをより正確に前後に並べます。",
"Which chunk rebuilds wait for the frame: none, nearby or yours.": "どのチャンクの再構築がフレームを待機するか: なし、近くのチャンク、または自分のチャンク。",
"Animates water, lava, fire and other moving textures.": "水、溶岩、火、その他の動くテクスチャをアニメーション化します。",
"World pixels per screen pixel. Below 100% is faster on the GPU.": "画面ピクセルごとのワールド ピクセル。 100% 未満の場合、GPU での速度が速くなります。",
"Smooths jagged edges. FXAA: softer. TAA: smoothest, moving things may trail.": "ギザギザのエッジを滑らかにします。 FXAA: 柔らかめ。 TAA: 最もスムーズですが、動いているものは尾を引く可能性があります。",
"Renders the world smaller and rebuilds it with TAA. Faster, softer.": "世界を小さくレンダリングし、TAA で再構築します。より速く、よりソフトに。",
"HDR output on an HDR display: lava, fire and sunlight shine brighter.": "HDR ディスプレイ上の HDR 出力: 溶岩、火、太陽光がより明るく輝きます。",
"How frames reach the screen while VSync is off.": "VSync がオフのときにフレームが画面に到達する方法。",
"Efficient sleeps until the next frame; Precise spins, like vanilla.": "次のフレームまで効率的にスリープします。バニラのような正確なスピン。",
"Fills the screen (borderless).": "画面いっぱい(フチなし)に表示します。",
"Brightens dark places.": "暗い場所を明るくします。",
"Lowers the frame rate when minimised, or idle too.": "最小化またはアイドル時にもフレーム レートを下げます。",
"Sways the view while walking.": "歩いていると景色が揺れます。",
"Fades newly loaded chunks in.": "新しくロードされたチャンクをフェードインします。",
"Darkens the screen's edges.": "画面の端を暗くします。",
"Shows when the world saves.": "世界が救われるときを示します。",
"Shows attack cooldown.": "攻撃のクールダウンを表示します。",
"60 FPS cap (30 in menus or unfocused), half the workers: less power.": "60 FPS の上限 (メニューまたはフォーカスされていない場合は 30)、ワーカーの半分: 電力が減少します。",
"Threads that generate, light and mesh chunks. Next start.": "チャンクを生成、ライト、メッシュするスレッド。次のスタート。",
"Vulkan, then DirectX 12 (Windows) or OpenGL (Linux) where it fails. Next start.": "Vulkan、次に DirectX 12 (Windows) または OpenGL (Linux) で失敗します。次のスタート。",
"Water and glass in one buffer: fewer draw calls, a bit more VRAM. Next start.": "1 つのバッファーに水とガラス: ドローコールが減り、VRAM が少し増えます。次のスタート。",
"Mesh data sent to the GPU per frame. Lower is smoother while loading.": "フレームごとに GPU に送信されるメッシュ データ。ローディング時は下のほうがスムーズです。",
"Frame rate and frame times over the game, with a graph.": "ゲーム全体のフレーム レートとフレーム時間をグラフで表示します。",
"horizon.multiplayer.finding_friend": "友達の世界を探しています...",
"horizon.multiplayer.not_signed_in": "このサーバーはオンライン モードです。 Horizon ランチャーに Microsoft アカウントを使用してサインインして、それに参加します。",
"horizon.multiplayer.invalid_address": "無効なサーバーアドレス: %s",
"horizon.multiplayer.connected_friend_direct": "友達と直接つながります...",
"horizon.multiplayer.connected_friend_relay": "リレーを通じて友達とつながっています...",
"General": "一般",
"Advanced": "上級者向け",
"Undo": "元に戻す",
"Search options": "検索オプション",
"Shortcut": "ショートカット",
"Distance": "距離",
"Display": "ディスプレイ",
"Interface": "インターフェース",
"Sky and weather": "空と天気",
"Lighting and entities": "照明とエンティティ",
"Textures": "テクスチャ",
"Image": "画像",
"Chunk loading": "チャンクロード",
"Culling": "淘汰",
"Power": "パワー",
"Frames": "フレーム",
"Overlay": "オーバーレイ",
"Output": "出力",
"Brightness": "明るさ",
"How far you see, the window and the HUD.": "窓とHUDがどこまで見えるか。",
"The sky and weather, lighting, textures and the image.": "空と天気、照明、テクスチャ、画像。",
"Chunk loading, culling and power use.": "チャンクのロード、カリング、および電力の使用。",
"How frames reach the screen, and the performance overlay.": "フレームが画面に到達する方法とパフォーマンス オーバーレイ。",
"Brighter-than-white output on an HDR display.": "HDR ディスプレイ上の白よりも明るい出力。",
"Results for \"%s\"": "「%s」の結果",
"No settings match.": "一致する設定がありません。",
"horizon.title.not_affiliated": "Mojang や Microsoft とは関係ありません",
"horizon.extras.header.lighting": "照明",
"horizon.extras.header.third_person": "第三者",
"horizon.extras.header.particles": "粒子",
"horizon.extras.header.inventory": "在庫",
"horizon.extras.header.chat": "チャット",
"horizon.extras.header.multiplayer": "マルチプレイヤー",
"horizon.extras.header.sound": "サウンド",
"horizon.extras.header.menus": "メニュー",
"horizon.extras.fullbright": "フルブライト",
"horizon.extras.dynamic_lights": "ダイナミックライト",
"horizon.extras.own_name_tag": "自分だけのネームタグ",
"horizon.extras.hide_block_particles": "ブロックブレイクパーティクルを非表示にする",
"horizon.extras.auto_reconnect": "自動再接続",
"horizon.extras.ui_sound_reserve": "UI サウンドのチャンネルを維持する",
"horizon.extras.music_page": "音楽ページ",
"horizon.extras.mouse_tweaks": "マウス調整コントロール",
"horizon.extras.mouse_tweaks_wheel": "スクロール ホイールで項目を移動します",
"horizon.extras.sort": "並べ替えボタン",
"horizon.extras.sort_key": "ソートキー",
"horizon.extras.no_ai": "AIなし",
"horizon.extras.agent_control": "エージェント制御",
"horizon.extras.discord_presence": "Discord のリッチなプレゼンス",
"horizon.extras.splitscreen": "分割画面",
"horizon.extras.chat_animation": "スムーズなチャット",
"horizon.extras.chat_indicator": "メッセージインジケーター",
"horizon.extras.wheel_cycles_settings": "スクロール ホイールで設定を変更します",
"horizon.extras.pack_browser": "リソースパックブラウザ",
"horizon.extras.fullbright.tooltip": "暗い場所でもブロックやエンティティを完全な光で表示します。",
"horizon.extras.dynamic_lights.tooltip": "トーチやその他の光源を持ったり、落としたり、火をつけたりすると、周囲のブロックが点灯します。",
"horizon.extras.own_name_tag.tooltip": "他のプレイヤーと同じように、三人称で自分の名前が頭上に表示されます。サーバーがチームの名前を隠している場合、またはあなたが表示されていない場合は、非表示になります。",
"horizon.extras.hide_block_particles.tooltip": "壊れたブロックから飛び出し、採掘したブロックから崩れ落ちる破片の粒子を隠します。他の粒子はそのまま残ります。",
"horizon.extras.auto_reconnect.tooltip": "キックや禁止の後ではなく、接続の喪失または再起動後にサーバーに再参加します。",
"horizon.extras.ui_sound_reserve.tooltip": "世界中のサウンドは 247 サウンド チャンネルのうち 16 チャンネルを解放しているため、それらの洪水 (大爆発) がメニュー クリックを沈黙させることはできません。",
"horizon.extras.music_page.tooltip": "Music & Sounds に Music... ページが表示されます。内蔵トラックを今すぐ再生するか、ゲームがトラックを選択しないように 1 つをオフにします。トラックをオフにするまでは何も変わりません。",
"horizon.extras.mouse_tweaks.tooltip": "右ドラッグでスロットごとに 1 つずつ配置し、左ドラッグで保持しているアイテムを収集し、Shift + 左ドラッグでスロットごとに移動します。",
"horizon.extras.mouse_tweaks_wheel.tooltip": "Down はスロットの 1 つの項目を反対側に送り、Up は 1 つの項目を戻します。",
"horizon.extras.sort.tooltip": "インベントリ、チェスト、バレル、エンダーチェスト、シュルカーボックスをクリエイティブなタブオーダーで並べ替え、スタックを結合します。",
"horizon.extras.sort_key.tooltip": "カーソル下の部分を並べ替えます。クリックしてキーを押します。エスケープするとバインドが解除されます。",
"horizon.extras.no_ai.tooltip": "すべての AI 機能 (エージェント コントロール、Horizon-ctl、MCP サーバー) を非表示にしてオフにします。ランチャーのスイッチも。",
"horizon.extras.agent_control.tooltip": "独自の AI エージェントは、このコンピューター上でのみ、horizon-ctl または MCP クライアントを通じてこのゲームをプレイできます。",
"horizon.extras.discord_presence.tooltip": "Discord の実行中に、Discord プロフィールに Playing Horizon が表示されます: メニュー、シングル プレーヤーまたはマルチプレーヤー、ディメンション、および再生時間が表示されます。決して世界の名前やサーバーのアドレスではありません。",
"Calibrate...": "校正...",
"Calibrate Anyway...": "とにかく校正してください...",
"Use Automatic Setup": "自動セットアップを使用する",
"Shortcut: %s": "ショートカット: %s",
"Next": "次へ",
"HDR Calibration %s/%s: %s": "HDR キャリブレーション %s/%s: %s",
"Sets the three below full screen, one test picture at a time.": "フルスクリーンの下の 3 つを、一度に 1 つのテスト画像を設定します。",
"A key that opens this screen from the game. Not bound at first.": "ゲームからこの画面を開くキー。最初は縛られてない。",
"Your display didn't say how bright it gets: calibrate to set it up.": "ディスプレイにはどのくらい明るくなるかは記載されていません。調整して設定してください。",
"Already set up for your display. Only calibrate if HDR looks wrong.": "ディスプレイ用にすでにセットアップされています。 HDR が間違っていると思われる場合にのみ調整してください。",
"Puts Peak Brightness and Paper White back to your display's setup.": "ピークの明るさとペーパー ホワイトをディスプレイの設定に戻します。",
"Set up for your display. Leave on Auto unless it looks wrong.": "ディスプレイに合わせて設定します。問題がなければ、[自動] のままにしておきます。",
"Lower it until the logo just disappears into the black.": "ロゴが真っ黒に消えるまで下げます。",
"Raise it until the logo just disappears into the bright square.": "ロゴが明るい四角形に消えるまで上げます。",
"Make the card a white that's comfortable to look at for a long time, in the light you play in.": "プレイする光の下で、カードを長時間見ても快適な白にします。",
"horizon.splitscreen.profiles.forget": "忘れる",
"horizon.splitscreen.profiles.create": "作成",
"horizon.splitscreen.profiles.you": " - あなた",
"horizon.splitscreen.profiles.forget_named": "%sは忘れてください",
"horizon.splitscreen.profiles.previous": "前へ",
"horizon.splitscreen.profiles.next": "次へ",
"horizon.splitscreen.profiles.new_button": "新しいプロフィール...",
"horizon.splitscreen.profiles.forget_title": "プロフィールを忘れましたか?",
"horizon.splitscreen.profiles.forget_leaves": "このインスタンスのリストを残します。",
"horizon.splitscreen.profiles.forget_kept": "ワールドの進行状況と設定は保持されます。",
"horizon.splitscreen.profiles.new_title": "新しいプロフィール",
"horizon.splitscreen.profiles.name_hint": "お名前(3~16文字の英数字、_)",
"horizon.splitscreen.profiles.switch_title": "プロファイルの切り替え",
"horizon.splitscreen.profiles.offline_note": "オフライン プロファイルはこのインスタンスに属します",
"horizon.splitscreen.profiles.move": "遊ぶ場所を移動する",
"horizon.splitscreen.profiles.move_place": "プレイする場所を移動: %s",
"horizon.friends.title": "友達と遊ぶ",
"horizon.friends.hint": "フレンドは、タイトル画面のフレンドボタンの後、ダイレクト接続、またはランチャーのプレイページにコードを貼り付けます。",
"horizon.friends.copied": "コピーされました",
"horizon.friends.copy_code": "コードをコピーする",
"horizon.friends.stop_sharing": "共有を停止する",
"horizon.friends.none_yet": "ここにはまだ友達がいません。",
"horizon.friends.here_now": "今ここ: %s",
"horizon.friends.share_intro": "招待コードを使用してこの世界を共有します。コードは LAN に開かれ、インターネット上の友人はコードを使用して参加します。弊社のサーバーは関与しておりません。",
"horizon.friends.start_sharing": "共有を開始する",
"horizon.friends.troubleshooting": "トラブルシューティング中...",
"horizon.friends.stopped": "招待コードの共有を停止しました。",
"horizon.friends.short_code_changed": "誰かが間違ったショートコードを試し続けたため、コードが変更されました。",
"horizon.friends.wrong_code": "誰かが間違ったコードを試みました。",
"horizon.friends.code_ready": "招待コードの準備が整いました: ゲーム メニュー、友達とプレイ。コピーして友達に送信してください。",
"horizon.friends.share_failed": "世界を共有できませんでした: %s",
"horizon.friends.finding_route": "友達があなたに連絡する方法を調べています…",
"horizon.osk.shift": "シフト",
"horizon.osk.space": "宇宙",
"horizon.osk.delete": "削除",
"horizon.osk.type": "種類",
"horizon.osk.symbols": "記号",
"horizon.osk.close": "閉じる",
"horizon.extras.chat_animation.tooltip": "新しいチャット ラインは全体として表示されるのではなく、フェードインしながら左側からスライドして表示されます。",
"horizon.extras.chat_indicator.tooltip": "チャットラインの左側にある色付きのバー。",
"horizon.extras.wheel_cycles_settings.tooltip": "バニラと同様に、設定内のボタン上でホイールをスクロールすると、その値が変更されます。オフの場合、ホイールはリストのみをスクロールします。",
"horizon.extras.pack_browser.tooltip": "[リソース パック] を選択すると、Modrinth を検索してパック フォルダーにパックをインストールする [追加] ボタンが表示されます。オフ、ゲームは決してモドリンスに接触しません。",
"horizon.extras.splitscreen.tooltip": "ワールドでは、別のコントローラーが新しいプレーヤーとして参加できます。メッセージが表示されたら A を押し、プロフィールとプレイする場所を選択します。",
"horizon.splitscreen.setup.monitor": "モニター%s",
"horizon.splitscreen.setup.monitor_unknown": "モニター",
"horizon.splitscreen.setup.window": "ウィンドウ%s",
"horizon.splitscreen.setup.new_window": "新しいウィンドウ",
"horizon.splitscreen.setup.fill_monitor": "%s を入力してください",
"horizon.splitscreen.setup.done": "完了",
"horizon.splitscreen.setup.on": "オン",
"horizon.splitscreen.setup.off": "オフ",
"horizon.splitscreen.setup.player": "プレーヤー%s",
"horizon.splitscreen.setup.revert": "元に戻す",
"horizon.splitscreen.setup.apply": "申し込む",
"horizon.splitscreen.setup.warning.empty_main": "ウィンドウ 1 では誰もプレイしません。ウィンドウ 1 は非表示になります。",
"horizon.splitscreen.setup.warning.empty_close": "ウィンドウ %s では誰もプレイしません: 適用時に閉じます",
"horizon.splitscreen.setup.warning.empty_new": "Window %s では誰もプレイしていません: 開きません",
"horizon.splitscreen.setup.warning.on_main": "ウィンドウ %s がウィンドウ 1 のモニターに表示されます。プレイヤーはウィンドウ 1 でプレイします。",
"horizon.splitscreen.setup.warning.unplugged": "Window %s のモニターが接続されていません。そのプレイヤーは Window 1 でプレイします。",
"horizon.splitscreen.setup.status.off": "画面分割がオフになっています。",
"horizon.splitscreen.setup.status.enable_hint": "それをオンにして、ワールド内の別のコントローラーのボタンを押します。",
"horizon.splitscreen.setup.status.join_hint": "A を押して参加し、プロフィールを選択します。",
"horizon.splitscreen.setup.status.idle": "分割画面のアイドル状態",
"horizon.splitscreen.setup.status.alone": "他に地元選手はいない。",
"horizon.splitscreen.setup.status.solo_controls": "ソロコントロールとコントローラーフィードバックは変更されません。",
"horizon.splitscreen.setup.window_empty": "ウィンドウ %s: 空",
"horizon.splitscreen.setup.note.select": "プレーヤーをクリックするか、ウィンドウまたはモニターにドラッグします。",
"horizon.splitscreen.setup.note.apply": "この方法で再生するには適用し、元に戻すには戻るを選択します。",
"horizon.splitscreen.setup.note.place": "%s はどこでプレイすべきですか?",
"horizon.splitscreen.setup.this_player": "この選手",
"horizon.splitscreen.setup.switch_disabled": "他の人が退席すると (一時停止メニュー)、分割画面はオフになります。",
"horizon.splitscreen.setup.window_place": "ウィンドウ %s (%s の %s)",
"horizon.splitscreen.setup.names": "名前",
"horizon.splitscreen.setup.identify": "特定する",
"horizon.splitscreen.setup.layout.two": "2 共有: %s",
"horizon.splitscreen.setup.layout.three": "3 共有: %s",
"horizon.splitscreen.setup.layout.two.0": "自動",
"horizon.splitscreen.setup.layout.two.1": "並んで",
"horizon.splitscreen.setup.layout.two.2": "上と下",
"horizon.splitscreen.setup.layout.three.0": "上にワイドが1つ",
"horizon.splitscreen.setup.layout.three.1": "左側の背の高い人",
"horizon.splitscreen.setup.layout.three.2": "並んで",
"horizon.splitscreen.setup.help.player": "%s をクリックまたはドラッグして移動します。",
"horizon.splitscreen.setup.help.layout_auto": "%s (ウィンドウが広い場合は横に並べて表示)。を押して変更します。",
"horizon.splitscreen.setup.help.layout": "%s。を押して変更します。",
"horizon.splitscreen.setup.help.switch": "このコンピュータの画面分割 (オンまたはオフ)。",
"horizon.splitscreen.setup.help.identify": "各プレイヤーのビューには、どのウィンドウにいるかが表示されます。",
"horizon.splitscreen.setup.help.names": "各プレイヤーの名前が視界の隅に表示されます。",
"horizon.splitscreen.setup.help.revert": "まだ適用されていない変更を元に戻します。",
"horizon.splitscreen.setup.help.apply": "マップに表示されている方法でプレイしてください。",
"horizon.splitscreen.setup.help.unchanged": "まだ何も変わっていません。",
"horizon.splitscreen.setup.give_up_pad": "ギブアップパッド",
"horizon.splitscreen.prompt.controller_connected": "コントローラーが接続されています",
"horizon.splitscreen.prompt.controller_disconnected": "コントローラーが切断されました",
"horizon.splitscreen.prompt.controller_disconnected.hint": "再接続するか、別のボタンを押してください",
"horizon.splitscreen.prompt.join.one": "%s さんは参加を希望しています",
"horizon.splitscreen.prompt.join.many": "%s コントローラーが参加を希望しています",
"horizon.splitscreen.prompt.join.yes": "参加する",
"horizon.splitscreen.prompt.join.as_p1": "P1としてプレイする",
"horizon.splitscreen.prompt.join.no": "いいえ",
"horizon.splitscreen.prompt.lost": "%s: コントローラーが切断されました",
"horizon.splitscreen.prompt.lost.use_another": "別のものを使用する",
"horizon.splitscreen.prompt.lost.leave": "休暇を取る",
"horizon.splitscreen.setup.help.give_up_pad": "コントローラーは運転を停止し、(A) に参加するよう勧められます。",
"horizon.splitscreen.setup.note.held_at": "%s から %s: A がここにドロップし、B が元に戻します。",
"horizon.splitscreen.setup.note.held": "%s を拾った: 左/右がどこにピックし、A がドロップし、B が元に戻します。",
"Hides models behind opaque blocks. Async checks off-thread; entities tick.": "モデルを不透明なブロックの後ろに隠します。非同期チェックはオフスレッドで行われます。エンティティがティックします。",
"Block Entities": "ブロックエンティティ",
"Shulker Boxes": "シュルカーボックス",
"Reuses settled boxes; lid movement stays animated.": "固定されたボックスを再利用します。蓋の動きはアニメーションのままです。",
"Signs": "標識",
"Reuses sign text until text, light, or font changes.": "テキスト、ライト、またはフォントが変更されるまで、署名テキストを再利用します。",
"Decorated Pots": "装飾鉢",
"Reuses still pots; break wobble and sherd changes redraw.": "蒸留器を再利用します。ぐらつきを解消し、シャードの変更を再描画します。",
"Bells": "ベル",
"Reuses still bells; ringing stays animated.": "静止ベルを再利用します。呼び出し音はアニメーションのままになります。",
"Chests": "チェスト",
"Reuses closed chests; moving lids stay animated.": "閉じたチェストを再利用します。動くまぶたはアニメーションを維持します。",
"Banners": "バナー",
"Reuses poles; flags and pattern layers still update.": "ポールを再利用します。フラグとパターンレイヤーは引き続き更新されます。",
"Copper Golem Statues": "銅のゴーレム像",
"Reuses statue geometry until its block state changes.": "ブロックの状態が変わるまで、彫像ジオメトリを再利用します。",
"Leaf Culling": "葉の間引き",
"Every leaf face. Vanilla's fancy leaves.": "すべての葉の顔。バニラのファンシーな葉っぱ。",
"Distant Plant Dither": "遠くの植物のディザー",
"Keeps fine plants in high-res packs from fading far away.": "高解像度パック内の立派な植物を遠く離れた場所で色褪せるのを防ぎます。",
"Screenshot Quality": "スクリーンショットの品質",
"F2 screenshots at this many times the game's resolution. Higher takes longer.": "F2 キーを押すと、ゲームの解像度の何倍もの解像度でスクリーンショットが撮影されます。高いほど時間がかかります。",
"Frame Generation": "フレーム生成",
"Shows a made-up frame between each two real ones: smoother, a little more lag.": "2 つの実際のフレームの間に構成されたフレームを表示します。よりスムーズで、少し遅れが生じます。",
"Shadow Cache": "シャドウキャッシュ",
"Reuses the pack shadow map when sun, view and world match. Off by default.": "太陽、ビュー、ワールドが一致する場合、パック シャドウ マップを再利用します。デフォルトではオフです。",
"Find BlueMap": "ブルーマップを探す",
"On servers, finds their BlueMap web map for far terrain. Next join.": "サーバー上で、遠方の地形用の BlueMap Web マップを検索します。次に参加します。",
"BlueMap Radius": "ブルーマップの半径",
"How far around you BlueMap tiles are downloaded. Next join.": "BlueMap タイルがダウンロードされる周囲の距離。次に参加します。",
"Synchronous": "同期",
"Asynchronous": "非同期",
"Solid": "固体",
"Solid Aggressive": "ソリッドアグレッシブ",
"Hollow": "中空",
"Leaves fully inside a canopy draw solid: fewer see-through layers.": "樹冠の内側に葉が完全に描画されるため、透けて見えるレイヤーが少なくなります。",
"Leaves with one open side draw solid too: faster, chunkier edges.": "片側が開いた葉もしっかりと描画され、エッジがより速く、より分厚くなります。",
"Drops faces between leaves: faster, but gaps look through.": "葉の間に面をドロップします: 速度は速くなりますが、隙間が透けて見えます。",
"Hotbar: Previous Slot": "ホットバー: 前のスロット",
"Hotbar: Next Slot": "ホットバー: 次のスロット",
"horizon.agent.connected.one": "接続済み: 1 つのエージェント接続",
"horizon.agent.connected.many": "接続済み: %s エージェント接続",
"horizon.agent.connected.one_ago": "接続済み: 1 エージェント接続、最後のコマンドは %s 秒前",
"horizon.agent.connected.many_ago": "接続済み: %s エージェント接続、最後のコマンド %s 秒前",
"horizon.agent.waiting": "エージェントを待っています。",
"horizon.agent.off": "オフ: エージェントはこのゲームにアクセスできません。",
"horizon.agent.session_opened": "ゲームを開始したプログラムによってこのセッション用に開かれました。",
"horizon.agent.socket": "ソケット: %s (フルパスの詳細をコピーします)",
"horizon.agent.local_only": "ローカルのみ: このコンピュータ上にエージェントがあり、ネットワーク上には存在しません。",
"%s nits": "%sニット",
"Auto (%s nits)": "自動 (%s ニット)",
"%.2f nits": "%.2fニット",
"Hides models behind opaque blocks. Entities update. Off with custom packs.": "モデルを不透明なブロックの後ろに隠します。エンティティが更新されます。カスタムパックでオフ。",
"horizon.extras.repro_keys": "録音のショートカット",
"horizon.extras.repro_keys.tooltip": "F3+R は再現録画を開始または停止し、F3+E はそのバンドルを書き込みます。デフォルトではオフ: 録音は世界をコピーします。",
"horizon.agent.record_session": "録音セッションの開始",
"horizon.agent.record_stop": "セッションの記録を停止",
"horizon.agent.export_repro": "レプロバンドルのエクスポート",
"horizon.repro.started": "録音が開始されました。 F3+R で停止し、バンドルを書き込みます。",
"horizon.repro.stopped": "記録が停止されました: %s",
"horizon.repro.bundle": "再現バンドル: %s",
"horizon.repro.error": "再現: %s",
"horizon.repro.no_recording": "エクスポートする録音がまだありません。",
"horizon.repro.replay_started": "リプレイ開始: %s",
"horizon.pack.addInfo": "Modrinth からリソース パックを追加する",
"horizon.pack.addWorking": "モドリンスに聞いてみると…",
"horizon.pack.addNone": "リソース パックが見つかりません",
"horizon.pack.addTitle": "リソースパックを追加する",
"horizon.pack.install": "インストール",
"horizon.pack.installing": "インストール中",
"horizon.pack.installed": "インストール済み",
"horizon.pack.search": "検索",
"horizon.pack.searchHint": "モドリンスを検索...",
"horizon.pack.filters": "フィルター",
"horizon.pack.filter.realistic": "現実的な",
"horizon.pack.filter.simplistic": "単純化した",
"horizon.pack.filter.vanillaLike": "バニラっぽい",
"horizon.pack.filter.x16": "16倍",
"horizon.pack.filter.x32": "32倍",
"horizon.pack.filter.x64": "64倍",
"horizon.pack.addFailed": "パックを追加できませんでした: %s",
"horizon.extras.header.cosmetics": "化粧品",
"horizon.extras.cosmetics_mine": "私の化粧品",
"horizon.extras.cosmetics_mine.tooltip": "非表示: すべての Horizon プレイヤーは、あなたも含め、化粧品を着用していないあなたを見ます。ランチャーのワードローブと同じスイッチ。",
"horizon.extras.cosmetics_others": "他のプレイヤーの化粧品",
"horizon.extras.cosmetics_others.tooltip": "他の Horizon プレイヤーが着ているもの: すべて、名札のスタイルのみ、または何も着ていません。隠されていますが、ゲームでは彼らが何を着ているかは尋ねられません。",
"horizon.extras.cosmetics_auras": "他人のオーラと軌跡",
"horizon.extras.cosmetics_auras.tooltip": "他のプレイヤーが身に着けているオーラと軌跡。デフォルトではオフです。",
"horizon.extras.cosmetics.shown": "示されている",
"horizon.extras.cosmetics.hidden": "隠された",
"horizon.extras.cosmetics.name_tags": "ネームタグのみ"
}
@@ -0,0 +1,476 @@
{
"horizon.options.controller": "Controleur",
"horizon.options.vibration": "Trillingen",
"horizon.options.adaptive_triggers": "Adaptieve triggers",
"horizon.options.lightbar": "Lichtbalk",
"horizon.options.look_sensitivity": "Kijkgevoeligheid",
"horizon.options.invert_x": "Kijkrichting X omkeren",
"horizon.options.invert_y": "Kijkrichting Y omkeren",
"horizon.options.sneak_button": "Sluipknop",
"horizon.options.move_deadzone": "Dode zone voor bewegen",
"horizon.options.look_deadzone": "Dode zone voor kijken",
"horizon.options.button_glyphs": "Knop-glyphs",
"horizon.options.menu_navigation": "Menunavigatie",
"horizon.options.on_screen_keyboard": "Schermtoetsenbord",
"horizon.options.chat_delay": "Chatvertraging",
"horizon.options.lightbar.health": "Gezondheid",
"horizon.options.lightbar.dimension": "Afmeting",
"horizon.options.glyphs.auto": "Automatisch",
"horizon.options.menu_pointer": "Aanwijzer",
"horizon.options.keyboard.auto": "Automatisch",
"horizon.options.keyboard.steam": "Stoom",
"horizon.options.unavailable": "Deze functie is nog niet beschikbaar in Horizon.",
"horizon.options.search": "Zoekinstellingen...",
"horizon.pages.shader_packs": "Shader-pakketten",
"horizon.pages.shader_options": "Shader-opties",
"horizon.pages.controller": "Controllerinstellingen",
"horizon.pages.controller_binds": "Controller bindt",
"horizon.pages.extras": "Horizon-extra's",
"horizon.pages.settings": "Horizon-instellingen",
"horizon.pages.agent": "AI-agent",
"horizon.split.leave": "Vertrekken",
"horizon.pages.split_settings": "Instellingen voor gesplitst scherm",
"horizon.pages.split_profiles": "Wie speelt er?",
"horizon.pages.split_setup": "Gesplitst scherm instellen",
"horizon.pages.music": "Muziek",
"horizon.pages.music.menu": "Menukaart",
"horizon.pages.music.overworld": "Bovenwereld",
"horizon.pages.music.creative": "Creatief",
"horizon.pages.music.underwater": "Onder water",
"horizon.pages.music.end": "Het einde",
"horizon.pages.music.boss": "Baas",
"horizon.pages.music.credits": "Kredieten",
"horizon.pages.music.overworld_biomes": "Overwereldbiomen",
"horizon.pages.music.nether_biomes": "Nether biomen",
"horizon.pages.music.end_biomes": "Beëindig biomen",
"horizon.pages.music.other": "Andere muziek",
"horizon.pages.music.empty": "Geen muzieknummers: de geluiden van het spel worden niet geladen.",
"horizon.pages.music.tooltip": "De ingebouwde nummers, per situatie: speel er nu één, of schakel er een uit zodat het spel stopt met het kiezen ervan.",
"horizon.pages.settings.tooltip": "Horizon's eigen instellingen: graphics, controllers, extra's en mods.",
"horizon.pages.graphics.tooltip": "Grafisch eenvoudig: elke instelling zegt wat het kost.",
"horizon.pages.graphics_advanced.tooltip": "Elke grafische instelling, inclusief Horizon's, met wat elke kost.",
"horizon.pages.controller.tooltip": "Controllers: hun knoppen, sticks, trillingen en menunavigatie.",
"horizon.pages.extras.tooltip": "Optionele toevoegingen, standaard allemaal uitgeschakeld: het spel blijft vanille totdat je er een inschakelt.",
"horizon.pages.agent.tooltip": "Laat je eigen AI-agent spelen: horizon-ctl en MCP-clients op deze computer.",
"horizon.pages.split_profiles.tooltip": "Wie speelt: een profiel dat in deze gamemap wordt bewaard.",
"horizon.pages.split_setup.tooltip": "De ramen en monitoren, en wie waar speelt.",
"horizon.pages.shader_packs.tooltip": "Shader-pakketten uit de map shaderpacks: die van Horizon en die in het shaders/-formaat. Er loopt er één tegelijk.",
"horizon.pages.mods.tooltip": "Mods gemaakt voor Horizon, uit de map horizon-mods. Ze worden allemaal in een sandbox uitgevoerd en blijven uitgeschakeld totdat u ze inschakelt.",
"horizon.pages.open.graphics": "Grafisch...",
"horizon.pages.open.graphics_advanced": "Geavanceerde grafische afbeeldingen...",
"horizon.pages.open.shader_packs": "Shader-pakketten...",
"horizon.pages.open.controller": "Controllerinstellingen...",
"horizon.pages.open.split_setup": "Gesplitst scherm...",
"horizon.pages.open.extras": "Extra's...",
"horizon.pages.open.agent": "AI-agent...",
"horizon.pages.open.horizon_graphics": "Horizon-afbeeldingen...",
"horizon.pages.open.controller_binds": "Controller bindt...",
"horizon.pages.open.horizon_settings": "Horizon-instellingen...",
"horizon.pages.open.music": "Muziek...",
"horizon.mods.empty": "Geen mods: plaats .hmod-bestanden in de map horizon-mods",
"horizon.mods.stopped": " (gestopt)",
"horizon.mods.not_built": " (Niet gebouwd)",
"horizon.mods.dev": " (Ontwikkelaar)",
"horizon.mods.settings": "Instellingen",
"horizon.mods.in_world": " (Laat de wereld veranderen)",
"horizon.mods.open_folder": "Open de Mod-map",
"horizon.shader_packs.empty": "Geen shader packs: plaats ze in de map shaderpacks",
"horizon.shader_options.open": "Shader-opties...",
"horizon.shader_options.profile": "Profiel",
"horizon.shader_options.loading": "De opties van het shader-pakket lezen...",
"horizon.agent.copy_details": "Kopieer verbindingsgegevens",
"horizon.multiplayer.join": "Doe mee",
"horizon.multiplayer.cancel_reconnecting": "Annuleren Opnieuw verbinden",
"horizon.multiplayer.join_friend": "Sluit je aan bij een vriend",
"horizon.multiplayer.invite_code": "Uitnodigingscode",
"horizon.multiplayer.relay": "relais (optioneel)",
"Preset": "Voorinstelling",
"LOD Distance": "LOD-afstand",
"Far Detail": "Verre details",
"Cave Culling": "Grot ruimen",
"Entity Culling": "Entiteit ruimen",
"Chunk Updates": "Chunk-updates",
"Upload Budget": "Budget uploaden",
"Sky": "Hemel",
"Fog": "Mist",
"Weather": "Weer",
"Animated Textures": "Geanimeerde texturen",
"Present Mode": "Huidige modus",
"Frame Pacing": "Frametempo",
"Worker Threads": "Werknemersdraden",
"Resolution Scale": "Resolutieschaal",
"Upscaling": "Opschaling",
"Paper White": "Papier Wit",
"Peak Brightness": "Piekhelderheid",
"Black Level": "Zwart niveau",
"UI Brightness": "UI-helderheid",
"Battery Mode": "Batterijmodus",
"Graphics API": "Grafische API",
"Translucent Batching": "Doorschijnend batchen",
"Performance Overlay": "Prestatie-overlay",
"Full Detail Distance": "Volledige detailafstand",
"On": "Aan",
"Off": "Uit",
"Unlimited": "Onbeperkt",
"Auto": "Automatisch",
"Custom": "Aangepast",
"Performance": "Prestaties",
"Balanced": "Evenwichtig",
"Quality": "Kwaliteit",
"Ultra Performance": "Ultra-prestaties",
"Native": "Inheems",
"Full": "Vol",
"Reduced": "Verlaagd",
"Efficient": "Efficiënt",
"Precise": "Nauwkeurig",
"Auto (VSync)": "Automatisch (VSync)",
"Mailbox": "Postbus",
"Immediate": "Onmiddellijk",
"Vulkan": "Vulkaan",
"FPS and Graph": "FPS en grafiek",
"No cost": "Geen kosten",
"Low cost": "Lage kosten",
"Medium cost": "Middelmatige kosten",
"High cost": "Hoge kosten",
"Saves time": "Bespaart tijd",
"Graphics": "Grafisch",
"Done": "Klaar",
"This feature is not yet available in Horizon.": "Deze functie is nog niet beschikbaar in Horizon.",
"Your display or system doesn't offer HDR output.": "Uw beeldscherm of systeem biedt geen HDR-uitvoer.",
"Turn HDR on to use it.": "Schakel HDR in om het te gebruiken.",
"Your GPU or graphics API doesn't support it.": "Uw GPU of grafische API ondersteunt dit niet.",
"%s chunks": "%s brokken",
"%s per frame": "%s per kader",
"Auto (%s)": "Automatisch (%s)",
"Full-detail terrain range. LOD Distance can extend local worlds farther.": "Volledig gedetailleerd terreinbereik. LOD Distance kan lokale werelden verder uitbreiden.",
"Coarse distant terrain in local worlds. Integrated GPUs stop at 128 chunks.": "Grof afgelegen terrein in lokale werelden. Geïntegreerde GPU's stoppen bij 128 chunks.",
"Reduced draws far terrain coarser: faster on this integrated GPU.": "Minder trekt veel terrein grover: sneller op deze geïntegreerde GPU.",
"Reduced draws far terrain coarser, for GPUs it slows down.": "Verminderd trekt veel terrein grover, voor GPU's vertraagt het.",
"Field of view. Wider shows more terrain at once.": "Gezichtsveld. Breder toont meer terrein tegelijk.",
"Caps frames per second; a cap saves power and heat.": "Maximaal frames per seconde; een dop bespaart stroom en warmte.",
"Waits for the display's refresh: no tearing, a little latency.": "Wacht op vernieuwing van het scherm: geen tearing, een beetje latentie.",
"Size of menus and the HUD.": "Grootte van menu's en de HUD.",
"Sets the options below together. Changing one makes it Custom.": "Stelt de onderstaande opties samen. Door er één te veranderen, wordt het aangepast.",
"Lava, fire and sunlight shine brighter than white. Needs an HDR display.": "Lava, vuur en zonlicht schijnen helderder dan wit. Heeft een HDR-scherm nodig.",
"Your display's darkest black. 0 for OLED; LCDs glow a little.": "Het donkerste zwart van je scherm. 0 voor OLED; LCD's gloeien een beetje.",
"How bright highlights get. Auto: the peak your system reports.": "Hoe heldere highlights worden. Auto: de piek die uw systeem rapporteert.",
"How bright white paper and menus look. Auto: your desktop's white.": "Hoe helder wit papier en menu's er uitzien. Automatisch: uw bureaublad is wit.",
"How bright the HUD and menus are, against paper white.": "Hoe helder de HUD en menu's zijn, tegen papierwit.",
"How far mobs, crops and machines keep working. CPU time.": "Hoe ver mobs, gewassen en machines blijven werken. CPU-tijd.",
"How far away mobs and items are drawn, as a share of normal.": "Hoe ver weg mobs en items worden getrokken, als percentage van normaal.",
"Skips terrain hidden behind closed sections. Off costs a lot.": "Slaat terrein over dat verborgen is achter gesloten secties. Uit kost veel.",
"Hides entities behind opaque blocks.": "Verbergt entiteiten achter ondoorzichtige blokken.",
"No entity occlusion culling.": "Geen occlusie van entiteiten.",
"CPU occlusion test runs this frame.": "De CPU-occlusietest voert dit frame uit.",
"Occlusion checks run on a worker thread.": "Occlusiecontroles worden uitgevoerd op een werkthread.",
"Meshed sections uploaded per frame. Lower is smoother while loading.": "Meshed secties geüpload per frame. Lager is soepeler tijdens het laden.",
"Soft shadows in corners. Costs chunk building time only.": "Zachte schaduwen in hoeken. Kost alleen maar bouwtijd.",
"Smaller copies of block textures for distant terrain: less shimmer.": "Kleinere kopieën van bloktexturen voor afgelegen terrein: minder glans.",
"Blends grass and water colours across biomes when building chunks.": "Mengt gras- en aquarelkleuren over biomen bij het bouwen van brokken.",
"Cloud layer: off, flat (fast) or 3D (fancy).": "Wolkenlaag: uit, plat (snel) of 3D (fancy).",
"How far clouds reach, in chunks.": "Hoe ver wolken reiken, in stukjes.",
"Draws the sky, sun, moon and stars.": "Tekent de lucht, de zon, de maan en de sterren.",
"Distance fog. Off shows the edge of the loaded world.": "Afstand mist. Off toont de rand van de beladen wereld.",
"Draws rain and snow.": "Trekt regen en sneeuw.",
"How far rain and snow fall around you.": "Hoe ver regen en sneeuw om je heen valt.",
"How many particles effects spawn.": "Hoeveel deeltjeseffecten spawnen.",
"Round shadows under mobs and items.": "Ronde schaduwen onder mobs en items.",
"Leaves with see-through gaps. Off draws them solid.": "Bladeren met doorzichtige gaten. Off trekt ze solide.",
"Sorts water and glass more exactly behind each other.": "Sorteert water en glas preciezer achter elkaar.",
"Which chunk rebuilds wait for the frame: none, nearby or yours.": "Welk deel opnieuw wordt opgebouwd, wacht op het frame: geen, dichtbij of van jou.",
"Animates water, lava, fire and other moving textures.": "Animeert water, lava, vuur en andere bewegende texturen.",
"World pixels per screen pixel. Below 100% is faster on the GPU.": "Wereldpixels per schermpixel. Onder de 100% is sneller op de GPU.",
"Smooths jagged edges. FXAA: softer. TAA: smoothest, moving things may trail.": "Maakt gekartelde randen glad. FXAA: zachter. TAA: de soepelste, bewegende dingen kunnen slepen.",
"Renders the world smaller and rebuilds it with TAA. Faster, softer.": "Maakt de wereld kleiner en herbouwt deze met TAA. Sneller, zachter.",
"HDR output on an HDR display: lava, fire and sunlight shine brighter.": "HDR-uitvoer op een HDR-scherm: lava, vuur en zonlicht schijnen helderder.",
"How frames reach the screen while VSync is off.": "Hoe frames het scherm bereiken terwijl VSync is uitgeschakeld.",
"Efficient sleeps until the next frame; Precise spins, like vanilla.": "Efficiënt slapen tot het volgende frame; Nauwkeurige spins, zoals vanille.",
"Fills the screen (borderless).": "Vult het scherm (randloos).",
"Brightens dark places.": "Verheldert donkere plekken.",
"Lowers the frame rate when minimised, or idle too.": "Verlaagt de framesnelheid wanneer deze is geminimaliseerd, of ook inactief.",
"Sways the view while walking.": "Verandert het zicht tijdens het lopen.",
"Fades newly loaded chunks in.": "Laat nieuw geladen chunks infaden.",
"Darkens the screen's edges.": "Maakt de randen van het scherm donkerder.",
"Shows when the world saves.": "Laat zien wanneer de wereld redt.",
"Shows attack cooldown.": "Toont de cooldown van de aanval.",
"60 FPS cap (30 in menus or unfocused), half the workers: less power.": "60 FPS-limiet (30 in menu's of ongericht), de helft van de werknemers: minder kracht.",
"Threads that generate, light and mesh chunks. Next start.": "Draden die brokken genereren, verlichten en meshen. Volgende start.",
"Vulkan, then DirectX 12 (Windows) or OpenGL (Linux) where it fails. Next start.": "Vulkan en vervolgens DirectX 12 (Windows) of OpenGL (Linux) waar het mislukt. Volgende start.",
"Water and glass in one buffer: fewer draw calls, a bit more VRAM. Next start.": "Water en glas in één buffer: minder draw calls, wat meer VRAM. Volgende start.",
"Mesh data sent to the GPU per frame. Lower is smoother while loading.": "Mesh-gegevens die per frame naar de GPU worden verzonden. Lager is soepeler tijdens het laden.",
"Frame rate and frame times over the game, with a graph.": "Framesnelheid en frametijden gedurende het spel, met een grafiek.",
"horizon.multiplayer.finding_friend": "Vind de wereld van je vriend...",
"horizon.multiplayer.not_signed_in": "Deze server bevindt zich in de onlinemodus. Meld u aan met uw Microsoft-account in het Horizon-opstartprogramma om hieraan deel te nemen.",
"horizon.multiplayer.invalid_address": "Ongeldig serveradres: %s",
"horizon.multiplayer.connected_friend_direct": "Rechtstreeks verbonden met je vriend...",
"horizon.multiplayer.connected_friend_relay": "Verbonden met je vriend via het relais...",
"General": "Algemeen",
"Advanced": "Geavanceerd",
"Undo": "Ongedaan maken",
"Search options": "Zoekopties",
"Shortcut": "Snelkoppeling",
"Distance": "Afstand",
"Display": "Weergave",
"Sky and weather": "Hemel en weer",
"Lighting and entities": "Verlichting en entiteiten",
"Textures": "Texturen",
"Image": "Afbeelding",
"Chunk loading": "Stukken laden",
"Culling": "Ruimen",
"Power": "Macht",
"Frames": "Lijsten",
"Output": "Uitvoer",
"Brightness": "Helderheid",
"How far you see, the window and the HUD.": "Hoe ver je kunt kijken, het raam en de HUD.",
"The sky and weather, lighting, textures and the image.": "De lucht en het weer, de verlichting, de texturen en het beeld.",
"Chunk loading, culling and power use.": "Het laden van brokken, het ruimen en het stroomverbruik.",
"How frames reach the screen, and the performance overlay.": "Hoe frames het scherm bereiken en de prestatie-overlay.",
"Brighter-than-white output on an HDR display.": "Helderder dan witte uitvoer op een HDR-scherm.",
"Results for \"%s\"": "Resultaten voor \"%s\"",
"No settings match.": "Er komen geen instellingen overeen.",
"horizon.title.not_affiliated": "Niet aangesloten bij Mojang of Microsoft",
"horizon.extras.header.lighting": "Verlichting",
"horizon.extras.header.third_person": "Derde persoon",
"horizon.extras.header.particles": "Deeltjes",
"horizon.extras.header.inventory": "Inventaris",
"horizon.extras.header.chat": "Chatten",
"horizon.extras.header.sound": "Geluid",
"horizon.extras.header.menus": "Menu's",
"horizon.extras.fullbright": "Volledig helder",
"horizon.extras.dynamic_lights": "Dynamische lichten",
"horizon.extras.own_name_tag": "Eigen naamplaatje",
"horizon.extras.hide_block_particles": "Verberg blokbrekende deeltjes",
"horizon.extras.auto_reconnect": "Automatisch opnieuw verbinden",
"horizon.extras.ui_sound_reserve": "Houd kanalen voor UI-geluiden",
"horizon.extras.music_page": "Muziek pagina",
"horizon.extras.mouse_tweaks": "Muisaanpassingen",
"horizon.extras.mouse_tweaks_wheel": "Scrollwiel verplaatst items",
"horizon.extras.sort": "Sorteerknoppen",
"horizon.extras.sort_key": "Sorteer sleutel",
"horizon.extras.no_ai": "Geen AI",
"horizon.extras.agent_control": "Agentcontrole",
"horizon.extras.discord_presence": "Onenigheid Rijke aanwezigheid",
"horizon.extras.splitscreen": "Gesplitst scherm",
"horizon.extras.chat_animation": "Vlotte babbel",
"horizon.extras.chat_indicator": "Berichtindicator",
"horizon.extras.wheel_cycles_settings": "Scrollwiel wijzigt instellingen",
"horizon.extras.pack_browser": "Bronpakketbrowser",
"horizon.extras.fullbright.tooltip": "Toon blokken en entiteiten bij vol licht, zelfs in donkere gebieden.",
"horizon.extras.dynamic_lights.tooltip": "Fakkels en andere lichtbronnen die je vasthoudt, laat vallen of in brand steken, verlichten de blokken eromheen.",
"horizon.extras.own_name_tag.tooltip": "Toont je naam boven je hoofd in de derde persoon, zoals andere spelers het zien. Verborgen wanneer de server de namen van uw team verbergt of u onzichtbaar bent.",
"horizon.extras.hide_block_particles.tooltip": "Verbergt de puindeeltjes die uit een gebroken blok barsten en afbrokkelen van het blok dat je ontgint. Andere deeltjes blijven.",
"horizon.extras.auto_reconnect.tooltip": "Sluit zich opnieuw aan bij een server na een verbroken verbinding of een herstart, nooit na een kick of ban.",
"horizon.extras.ui_sound_reserve.tooltip": "Geluiden in de wereld laten 16 van de 247 geluidskanalen vrij, dus een overstroming ervan (een grote explosie) kan menuklikken niet tot zwijgen brengen.",
"horizon.extras.music_page.tooltip": "Muziek en geluiden krijgt een Muziek...-pagina: speel nu een ingebouwd nummer, of schakel er een uit zodat het spel het niet meer kiest. Er verandert niets totdat je een nummer uitschakelt.",
"horizon.extras.mouse_tweaks.tooltip": "Met rechts slepen wordt er één per slot geplaatst, met links slepen wordt het vastgehouden item verzameld, Shift + links slepen verplaatst elk slot.",
"horizon.extras.mouse_tweaks_wheel.tooltip": "Omlaag stuurt een item van de gleuf naar de andere kant, omhoog brengt er één terug.",
"horizon.extras.sort.tooltip": "Sorteert de inventaris, kisten, vaten, enderkisten en shulkerdozen in creatieve tabvolgorde, waarbij stapels worden samengevoegd.",
"horizon.extras.sort_key.tooltip": "Sorteert het gedeelte onder de cursor. Klik en druk vervolgens op een toets; Ontsnappen maakt het los.",
"horizon.extras.no_ai.tooltip": "Verbergt en schakelt elke AI-functie uit: agentcontrole, horizon-ctl en de MCP-servers. De schakelaar van de draagraket ook.",
"horizon.extras.agent_control.tooltip": "Je eigen AI-agent kan dit spel alleen op deze computer spelen via horizon-ctl of een MCP-client.",
"horizon.extras.discord_presence.tooltip": "Toont 'Speelt Horizon' op je Discord-profiel terwijl Discord actief is: menu's, singleplayer of multiplayer, de dimensie en de gespeelde tijd. Nooit een wereldnaam of een serveradres.",
"Calibrate...": "Kalibreer...",
"Calibrate Anyway...": "Hoe dan ook kalibreren...",
"Use Automatic Setup": "Gebruik automatische configuratie",
"Shortcut: %s": "Sneltoets: %s",
"Next": "Volgende",
"HDR Calibration %s/%s: %s": "HDR-kalibratie %s/%s: %s",
"Sets the three below full screen, one test picture at a time.": "Stelt de onderstaande drie in op volledig scherm, één testbeeld tegelijk.",
"A key that opens this screen from the game. Not bound at first.": "Een sleutel die dit scherm vanuit het spel opent. In eerste instantie niet gebonden.",
"Your display didn't say how bright it gets: calibrate to set it up.": "Uw display heeft niet aangegeven hoe helder het wordt: kalibreer om het in te stellen.",
"Already set up for your display. Only calibrate if HDR looks wrong.": "Al ingesteld voor uw beeldscherm. Kalibreer alleen als HDR er verkeerd uitziet.",
"Puts Peak Brightness and Paper White back to your display's setup.": "Zet piekhelderheid en papierwit terug in de instellingen van uw beeldscherm.",
"Set up for your display. Leave on Auto unless it looks wrong.": "Instellen voor uw beeldscherm. Laat Auto staan, tenzij het er verkeerd uitziet.",
"Lower it until the logo just disappears into the black.": "Laat hem zakken totdat het logo net in het zwart verdwijnt.",
"Raise it until the logo just disappears into the bright square.": "Breng hem omhoog totdat het logo net in het heldere vierkant verdwijnt.",
"Make the card a white that's comfortable to look at for a long time, in the light you play in.": "Maak de kaart wit, zodat je er lang naar kunt kijken, in het licht waarin je speelt.",
"horizon.splitscreen.profiles.forget": "Vergeet",
"horizon.splitscreen.profiles.create": "Creëer",
"horizon.splitscreen.profiles.you": " - jij",
"horizon.splitscreen.profiles.forget_named": "Vergeet %s",
"horizon.splitscreen.profiles.previous": "Vorige",
"horizon.splitscreen.profiles.next": "Volgende",
"horizon.splitscreen.profiles.new_button": "Nieuw profiel...",
"horizon.splitscreen.profiles.forget_title": "Profiel vergeten?",
"horizon.splitscreen.profiles.forget_leaves": "Het verlaat de lijst van deze instantie.",
"horizon.splitscreen.profiles.forget_kept": "De voortgang en instellingen van de wereld blijven behouden.",
"horizon.splitscreen.profiles.new_title": "Nieuw profiel",
"horizon.splitscreen.profiles.name_hint": "Naam (3 tot 16 letters, cijfers, _)",
"horizon.splitscreen.profiles.switch_title": "Profiel wisselen",
"horizon.splitscreen.profiles.offline_note": "Offline profielen behoren tot deze instantie",
"horizon.splitscreen.profiles.move": "Verplaats waar je speelt",
"horizon.splitscreen.profiles.move_place": "Verplaatsen waar je speelt: %s",
"horizon.friends.title": "Speel met vrienden",
"horizon.friends.hint": "Vrienden plakken de code na de knop Vrienden in het titelscherm, in Directe verbinding of op de Play-pagina van het opstartprogramma.",
"horizon.friends.copied": "Gekopieerd",
"horizon.friends.copy_code": "Kopieer code",
"horizon.friends.stop_sharing": "Stop met delen",
"horizon.friends.none_yet": "Nog geen vrienden hier.",
"horizon.friends.here_now": "Hier nu: %s",
"horizon.friends.share_intro": "Deel deze wereld achter een uitnodigingscode: deze wordt geopend voor LAN en vrienden op internet doen mee met de code. Er is geen server van ons bij betrokken.",
"horizon.friends.start_sharing": "Begin met delen",
"horizon.friends.troubleshooting": "Problemen oplossen...",
"horizon.friends.stopped": "Het delen van de uitnodigingscode is gestopt.",
"horizon.friends.short_code_changed": "Iemand probeerde steeds een verkeerde shortcode, dus het veranderde.",
"horizon.friends.wrong_code": "Iemand heeft een verkeerde code geprobeerd.",
"horizon.friends.code_ready": "Je uitnodigingscode is klaar: Gamemenu, Spelen met vrienden. Kopieer het en stuur het naar je vrienden.",
"horizon.friends.share_failed": "Kon de wereld niet delen: %s",
"horizon.friends.finding_route": "Ontdek hoe vrienden u kunnen bereiken...",
"horizon.osk.shift": "Verschuiving",
"horizon.osk.space": "Ruimte",
"horizon.osk.delete": "Verwijderen",
"horizon.osk.type": "Typ",
"horizon.osk.symbols": "Symbolen",
"horizon.osk.close": "Sluiten",
"horizon.extras.chat_animation.tooltip": "Een nieuwe chatlijn schuift van links naar binnen terwijl deze invaagt, in plaats van geheel te lijken.",
"horizon.extras.chat_indicator.tooltip": "De gekleurde balk links van een chatlijn.",
"horizon.extras.wheel_cycles_settings.tooltip": "Het scrollwiel boven een knop in de instellingen verandert de waarde, zoals in vanille. Uit: het wiel scrollt alleen door de lijst.",
"horizon.extras.pack_browser.tooltip": "Select Resource Packs krijgt een knop Toevoegen die Modrinth doorzoekt en een pakket in uw packs-map installeert. Uit: het spel maakt nooit contact met Modrinth.",
"horizon.extras.splitscreen.tooltip": "In een wereld kan een andere controller meedoen als nieuwe speler: druk op A wanneer dit wordt gevraagd, kies vervolgens een profiel en waar je wilt spelen.",
"horizon.splitscreen.setup.monitor_unknown": "een monitor",
"horizon.splitscreen.setup.window": "Raam %s",
"horizon.splitscreen.setup.new_window": "Nieuw venster",
"horizon.splitscreen.setup.fill_monitor": "Vul %s",
"horizon.splitscreen.setup.done": "Klaar",
"horizon.splitscreen.setup.on": "Aan",
"horizon.splitscreen.setup.off": "Uit",
"horizon.splitscreen.setup.player": "Speler %s",
"horizon.splitscreen.setup.revert": "Terugkeren",
"horizon.splitscreen.setup.apply": "Toepassen",
"horizon.splitscreen.setup.warning.empty_main": "Niemand speelt in Venster 1: het verbergt zich",
"horizon.splitscreen.setup.warning.empty_close": "Niemand speelt in Venster %s: het wordt gesloten bij Toepassen",
"horizon.splitscreen.setup.warning.empty_new": "Niemand speelt in Venster %s: het gaat niet open",
"horizon.splitscreen.setup.warning.on_main": "Venster %s vult de monitor van Venster 1: de spelers spelen in Venster 1",
"horizon.splitscreen.setup.warning.unplugged": "De monitor van Venster %s is niet aangesloten: de spelers spelen in Venster 1",
"horizon.splitscreen.setup.status.off": "Splitscreen staat uit.",
"horizon.splitscreen.setup.status.enable_hint": "Schakel hem in en druk vervolgens op een knop op een andere controller in een wereld.",
"horizon.splitscreen.setup.status.join_hint": "Druk op A om lid te worden en een profiel te kiezen.",
"horizon.splitscreen.setup.status.idle": "Splitscreen inactief",
"horizon.splitscreen.setup.status.alone": "Geen andere lokale spelers.",
"horizon.splitscreen.setup.status.solo_controls": "Solobediening en controllerfeedback zijn ongewijzigd.",
"horizon.splitscreen.setup.window_empty": "Venster %s: leeg",
"horizon.splitscreen.setup.note.select": "Klik op een speler of sleep deze naar een venster of monitor.",
"horizon.splitscreen.setup.note.apply": "Toepassen om op deze manier te spelen, Terug naar ongedaan maken.",
"horizon.splitscreen.setup.note.place": "Waar moet %s spelen?",
"horizon.splitscreen.setup.this_player": "deze speler",
"horizon.splitscreen.setup.switch_disabled": "Splitscreen wordt uitgeschakeld zodra de anderen zijn vertrokken (hun pauzemenu).",
"horizon.splitscreen.setup.window_place": "Venster %s (%s van %s)",
"horizon.splitscreen.setup.names": "Namen",
"horizon.splitscreen.setup.identify": "Identificeer",
"horizon.splitscreen.setup.layout.two": "2 delen: %s",
"horizon.splitscreen.setup.layout.three": "3 delen: %s",
"horizon.splitscreen.setup.layout.two.0": "Automatisch",
"horizon.splitscreen.setup.layout.two.1": "Zij aan zij",
"horizon.splitscreen.setup.layout.two.2": "Boven- en onderkant",
"horizon.splitscreen.setup.layout.three.0": "Eén breed bovenaan",
"horizon.splitscreen.setup.layout.three.1": "Links een lange",
"horizon.splitscreen.setup.layout.three.2": "Zij aan zij",
"horizon.splitscreen.setup.help.player": "Klik of sleep %s om ze te verplaatsen.",
"horizon.splitscreen.setup.help.layout_auto": "%s (naast elkaar als het raam breed is). Druk op om te wijzigen.",
"horizon.splitscreen.setup.help.layout": "%s. Druk op om te wijzigen.",
"horizon.splitscreen.setup.help.switch": "Splitscreen voor deze computer, aan of uit.",
"horizon.splitscreen.setup.help.identify": "In het zicht van elke speler kun je zien in welk venster hij zich bevindt.",
"horizon.splitscreen.setup.help.names": "De naam van elke speler in de hoek van zijn weergave.",
"horizon.splitscreen.setup.help.revert": "Maak de nog niet toegepaste wijzigingen ongedaan.",
"horizon.splitscreen.setup.help.apply": "Speel zoals de kaart laat zien.",
"horizon.splitscreen.setup.help.unchanged": "Er is nog niets veranderd.",
"horizon.splitscreen.setup.give_up_pad": "Geef Pad op",
"horizon.splitscreen.prompt.controller_connected": "Regelaar aangesloten",
"horizon.splitscreen.prompt.controller_disconnected": "Regelaar losgekoppeld",
"horizon.splitscreen.prompt.controller_disconnected.hint": "Sluit hem opnieuw aan of druk op een knop op een andere",
"horizon.splitscreen.prompt.join.one": "%s wil lid worden",
"horizon.splitscreen.prompt.join.many": "%s-controllers willen meedoen",
"horizon.splitscreen.prompt.join.yes": "Doe mee",
"horizon.splitscreen.prompt.join.as_p1": "Speel als P1",
"horizon.splitscreen.prompt.join.no": "Nee",
"horizon.splitscreen.prompt.lost": "%s: regelaar losgekoppeld",
"horizon.splitscreen.prompt.lost.use_another": "Gebruik een andere",
"horizon.splitscreen.prompt.lost.leave": "Vertrekken",
"horizon.splitscreen.setup.help.give_up_pad": "Uw controller stopt met rijden en wordt aangeboden om mee te doen (A).",
"horizon.splitscreen.setup.note.held_at": "%s tot %s: A laat het hier vallen, B legt het terug.",
"horizon.splitscreen.setup.note.held": "%s opgepakt: links/rechts kiest waar, A laat vallen, B legt het terug.",
"Hides models behind opaque blocks. Async checks off-thread; entities tick.": "Verbergt modellen achter ondoorzichtige blokken. Asynchrone controles buiten de thread; entiteiten aanvinken.",
"Block Entities": "Blokkeer entiteiten",
"Shulker Boxes": "Shulker-dozen",
"Reuses settled boxes; lid movement stays animated.": "Hergebruikt bezette dozen; dekselbeweging blijft geanimeerd.",
"Signs": "Tekenen",
"Reuses sign text until text, light, or font changes.": "Hergebruikt ondertekende tekst totdat de tekst, het licht of het lettertype verandert.",
"Decorated Pots": "Versierde potten",
"Reuses still pots; break wobble and sherd changes redraw.": "Hergebruikt nog steeds potten; breken wiebelen en scherfveranderingen opnieuw tekenen.",
"Bells": "Klokken",
"Reuses still bells; ringing stays animated.": "Hergebruikt nog steeds bellen; beltoon blijft geanimeerd.",
"Chests": "Kisten",
"Reuses closed chests; moving lids stay animated.": "Hergebruik gesloten kisten; bewegende deksels blijven geanimeerd.",
"Reuses poles; flags and pattern layers still update.": "Hergebruik stokken; vlaggen en patroonlagen worden nog steeds bijgewerkt.",
"Copper Golem Statues": "Koperen Golem-beelden",
"Reuses statue geometry until its block state changes.": "Hergebruikt de geometrie van het standbeeld totdat de blokstatus verandert.",
"Leaf Culling": "Blad ruimen",
"Every leaf face. Vanilla's fancy leaves.": "Elk bladvlak. De mooie bladeren van vanille.",
"Distant Plant Dither": "Verre plantendithering",
"Keeps fine plants in high-res packs from fading far away.": "Zorgt ervoor dat mooie planten in pakketten met hoge resolutie niet ver weg vervagen.",
"Screenshot Quality": "Screenshotkwaliteit",
"F2 screenshots at this many times the game's resolution. Higher takes longer.": "F2-screenshots met deze resolutie die vele malen hoger is dan die van het spel. Hoger duurt langer.",
"Frame Generation": "Framegeneratie",
"Shows a made-up frame between each two real ones: smoother, a little more lag.": "Toont een verzonnen frame tussen elke twee echte: vloeiender, iets meer vertraging.",
"Shadow Cache": "Schaduwcache",
"Reuses the pack shadow map when sun, view and world match. Off by default.": "Hergebruikt de roedelschaduwkaart wanneer zon, zicht en wereld overeenkomen. Standaard uitgeschakeld.",
"Find BlueMap": "Zoek BlueMap",
"On servers, finds their BlueMap web map for far terrain. Next join.": "Vindt op servers hun BlueMap-webkaart voor ver terrein. Volgende meedoen.",
"BlueMap Radius": "BlueMap-radius",
"How far around you BlueMap tiles are downloaded. Next join.": "Hoe ver om je heen BlueMap-tegels worden gedownload. Volgende meedoen.",
"Synchronous": "Synchronisch",
"Asynchronous": "Asynchroon",
"Solid": "Solide",
"Solid Aggressive": "Solide agressief",
"Hollow": "Hol",
"Leaves fully inside a canopy draw solid: fewer see-through layers.": "Bladeren die zich volledig in een bladerdak bevinden, trekken stevig aan: minder doorzichtige lagen.",
"Leaves with one open side draw solid too: faster, chunkier edges.": "Bladeren met één open zijde zijn ook stevig: snellere, grovere randen.",
"Drops faces between leaves: faster, but gaps look through.": "Laat gezichten tussen bladeren vallen: sneller, maar gaten kijken er doorheen.",
"Hotbar: Previous Slot": "Hotbar: Vorig slot",
"Hotbar: Next Slot": "Hotbar: volgende slot",
"horizon.agent.connected.one": "Verbonden: 1 agentverbinding",
"horizon.agent.connected.many": "Verbonden: %s agentverbindingen",
"horizon.agent.connected.one_ago": "Verbonden: 1 agentverbinding, laatste opdracht %s s geleden",
"horizon.agent.connected.many_ago": "Verbonden: %s agentverbindingen, laatste opdracht %s s geleden",
"horizon.agent.waiting": "Wachten op een agent.",
"horizon.agent.off": "Uit: agenten kunnen dit spel niet bereiken.",
"horizon.agent.session_opened": "Voor deze sessie geopend door het programma waarmee het spel is gestart.",
"horizon.agent.socket": "Socket: %s (kopieer de details voor het volledige pad)",
"horizon.agent.local_only": "Alleen lokaal: agenten op deze computer, nooit op het netwerk.",
"Auto (%s nits)": "Automatisch (%s nits)",
"Hides models behind opaque blocks. Entities update. Off with custom packs.": "Verbergt modellen achter ondoorzichtige blokken. Entiteiten bijgewerkt. Weg met aangepaste pakketten.",
"horizon.extras.repro_keys": "Snelkoppelingen voor opnemen",
"horizon.extras.repro_keys.tooltip": "F3+R start of stopt een repro-opname en F3+E schrijft zijn bundel. Standaard uitgeschakeld: een opname kopieert de wereld.",
"horizon.agent.record_session": "Opnamesessie starten",
"horizon.agent.record_stop": "Stop de opnamesessie",
"horizon.agent.export_repro": "Reprobundel exporteren",
"horizon.repro.started": "Opname gestart; F3+R stopt het en schrijft de bundel.",
"horizon.repro.stopped": "Opname gestopt: %s",
"horizon.repro.bundle": "Reprobundel: %s",
"horizon.repro.error": "Reproductie: %s",
"horizon.repro.no_recording": "Er is nog geen opname om te exporteren.",
"horizon.repro.replay_started": "Herhaling gestart: %s",
"horizon.pack.addInfo": "Voeg een resourcepakket van Modrinth toe",
"horizon.pack.addWorking": "Modrinth gevraagd...",
"horizon.pack.addNone": "Geen bronpakketten gevonden",
"horizon.pack.addTitle": "Voeg een resourcepakket toe",
"horizon.pack.install": "Installeren",
"horizon.pack.installing": "Installeren",
"horizon.pack.installed": "Geïnstalleerd",
"horizon.pack.search": "Zoeken",
"horizon.pack.searchHint": "Zoek Modrinth...",
"horizon.pack.filter.realistic": "Realistisch",
"horizon.pack.filter.simplistic": "Simplistisch",
"horizon.pack.filter.vanillaLike": "Vanille-achtig",
"horizon.pack.addFailed": "Het pakket kon niet worden toegevoegd: %s",
"horizon.extras.header.cosmetics": "Cosmetica",
"horizon.extras.cosmetics_mine": "Mijn cosmetica",
"horizon.extras.cosmetics_mine.tooltip": "Verborgen: elke Horizon-speler ziet je zonder je cosmetica, inclusief jij. Dezelfde schakelaar als de kledingkast van de draagraket.",
"horizon.extras.cosmetics_others": "Cosmetica van andere spelers",
"horizon.extras.cosmetics_others.tooltip": "Wat andere Horizon-spelers dragen: alles, alleen hun naamplaatjestijlen, of niets. Verborgen vraagt het spel nooit wat ze dragen.",
"horizon.extras.cosmetics_auras": "De aura's en sporen van anderen",
"horizon.extras.cosmetics_auras.tooltip": "Aura's en sporen die andere spelers dragen. Standaard uitgeschakeld.",
"horizon.extras.cosmetics.shown": "Getoond",
"horizon.extras.cosmetics.hidden": "Verborgen",
"horizon.extras.cosmetics.name_tags": "Alleen naamplaatjes"
}
@@ -321,6 +321,8 @@
"Reuses the pack shadow map when sun, view and world match. Off by default.": "Używa ponownie mapy cieni paczki, gdy słońce, widok i świat się zgadzają. Domyślnie wyłączone.",
"Synchronous": "Synchroniczne",
"Asynchronous": "Asynchroniczne",
"Hidden Faces": "Ukryte ściany",
"Drops leaf faces behind two leaf layers: faster, same crowns.": "Pomija ściany liści za dwiema warstwami liści: szybciej, korony bez zmian.",
"Solid": "Pełne",
"Solid Aggressive": "Pełne, agresywnie",
"Hollow": "Puste",
@@ -354,5 +356,9 @@
"horizon.pages.open.split_setup": "Podzielony ekran…",
"horizon.pages.split_settings": "Ustawienia podzielonego ekranu",
"horizon.pages.split_setup": "Podzielony ekran",
"horizon.pages.split_setup.tooltip": "Gracze na tym komputerze: kontrolery mogą dołączyć do twojego świata."
"horizon.pages.split_setup.tooltip": "Gracze na tym komputerze: kontrolery mogą dołączyć do twojego świata.",
"Particle Culling": "Pomijanie cząsteczek",
"Draws every particle.": "Rysuje wszystkie cząsteczki.",
"Skips offscreen, subpixel and terrain-hidden particles.": "Pomija cząsteczki poza ekranem, mniejsze niż piksel i zasłonięte przez teren.",
"Skips offscreen, subpixel and terrain-hidden particles with less render-thread work.": "Pomija cząsteczki poza ekranem, mniejsze niż piksel i zasłonięte przez teren, odciążając wątek renderowania."
}
@@ -0,0 +1,491 @@
{
"horizon.options.controller": "Controlador",
"horizon.options.vibration": "Vibração",
"horizon.options.adaptive_triggers": "Gatilhos adaptativos",
"horizon.options.lightbar": "Barra de luzes",
"horizon.options.look_sensitivity": "Sensibilidade da câmera",
"horizon.options.invert_x": "Inverter câmera X",
"horizon.options.invert_y": "Inverter câmera Y",
"horizon.options.sneak_button": "Botão de agachar",
"horizon.options.move_deadzone": "Zona morta do movimento",
"horizon.options.look_deadzone": "Zona morta da câmera",
"horizon.options.button_glyphs": "Glifos de botão",
"horizon.options.menu_navigation": "Navegação no menu",
"horizon.options.on_screen_keyboard": "Teclado na tela",
"horizon.options.chat_delay": "Atraso no bate-papo",
"horizon.options.lightbar.health": "Saúde",
"horizon.options.lightbar.dimension": "Dimensão",
"horizon.options.glyphs.auto": "Automático",
"horizon.options.glyphs.playstation": "Playstation",
"horizon.options.menu_focus": "Foco",
"horizon.options.menu_pointer": "Ponteiro",
"horizon.options.keyboard.auto": "Automático",
"horizon.options.keyboard.horizon": "Horizonte",
"horizon.options.keyboard.steam": "Vapor",
"horizon.options.unavailable": "Este recurso ainda não está disponível no Horizon.",
"horizon.options.search": "Configurações de pesquisa...",
"horizon.pages.mods": "Modificações",
"horizon.pages.shader_packs": "Pacotes de sombreadores",
"horizon.pages.shader_options": "Opções de sombreamento",
"horizon.pages.controller": "Configurações do controlador",
"horizon.pages.controller_binds": "Ligações de controlador",
"horizon.pages.extras": "Extras Horizonte",
"horizon.pages.settings": "Configurações do Horizon",
"horizon.pages.agent": "Agente de IA",
"horizon.split.leave": "Sair",
"horizon.pages.split_settings": "Configurações de tela dividida",
"horizon.pages.split_profiles": "Quem está jogando?",
"horizon.pages.split_setup": "Configuração de tela dividida",
"horizon.pages.music": "Música",
"horizon.pages.music.menu": "Cardápio",
"horizon.pages.music.overworld": "Mundo superior",
"horizon.pages.music.creative": "Criativo",
"horizon.pages.music.underwater": "Subaquático",
"horizon.pages.music.end": "O Fim",
"horizon.pages.music.boss": "Chefe",
"horizon.pages.music.credits": "Créditos",
"horizon.pages.music.overworld_biomes": "Biomas do mundo superior",
"horizon.pages.music.nether_biomes": "Biomas inferiores",
"horizon.pages.music.end_biomes": "Fim dos biomas",
"horizon.pages.music.other": "Outras músicas",
"horizon.pages.music.empty": "Sem faixas de música: os sons do jogo não são carregados.",
"horizon.pages.music.tooltip": "As faixas integradas, por situação: toque uma agora ou desligue alguma para que o jogo pare de selecioná-la.",
"horizon.pages.settings.tooltip": "Configurações próprias do Horizon: gráficos, controladores, extras e mods.",
"horizon.pages.graphics.tooltip": "Gráficos, simplesmente: cada configuração diz quanto custa.",
"horizon.pages.graphics_advanced.tooltip": "Todas as configurações gráficas, incluindo Horizon, com o custo de cada uma.",
"horizon.pages.controller.tooltip": "Controladores: seus botões, manípulos, vibração e navegação no menu.",
"horizon.pages.extras.tooltip": "Adições opcionais, todas desativadas por padrão: o jogo permanece básico até você ligar um.",
"horizon.pages.agent.tooltip": "Deixe seu próprio agente de IA jogar: clientes Horizon-ctl e MCP neste computador.",
"horizon.pages.split_profiles.tooltip": "Quem joga: um perfil mantido nesta pasta do jogo.",
"horizon.pages.split_setup.tooltip": "As janelas e monitores, e quem joga onde.",
"horizon.pages.shader_packs.tooltip": "Shader packs da pasta shaderpacks: próprios do Horizon e aqueles no formato shaders/. Um corre de cada vez.",
"horizon.pages.mods.tooltip": "Mods feitos para Horizon, da pasta Horizon-mods. Cada um é executado em uma sandbox e permanece desligado até você ligá-lo.",
"horizon.pages.open.graphics": "Gráficos...",
"horizon.pages.open.graphics_advanced": "Gráficos avançados...",
"horizon.pages.open.shader_packs": "Pacotes de sombreadores...",
"horizon.pages.open.controller": "Configurações do controlador...",
"horizon.pages.open.split_setup": "Tela dividida...",
"horizon.pages.open.mods": "Modos...",
"horizon.pages.open.agent": "Agente de IA...",
"horizon.pages.open.horizon_graphics": "Gráficos Horizonte...",
"horizon.pages.open.controller_binds": "Ligações do controlador...",
"horizon.pages.open.horizon_settings": "Configurações do Horizon...",
"horizon.pages.open.music": "Música...",
"horizon.mods.empty": "Sem mods: coloque os arquivos .hmod na pasta horizonte-mods",
"horizon.mods.stopped": " (Parado)",
"horizon.mods.not_built": " (Não construído)",
"horizon.mods.dev": " (Desenvolvedor)",
"horizon.mods.settings": "Configurações",
"horizon.mods.in_world": " (deixe o mundo mudar)",
"horizon.mods.open_folder": "Abra a pasta Mod",
"horizon.shader_packs.empty": "Sem pacotes de shader: coloque-os na pasta shaderpacks",
"horizon.shader_packs.kind_horizon": " (Horizonte)",
"horizon.shader_options.open": "Opções de sombreamento...",
"horizon.shader_options.profile": "Perfil",
"horizon.shader_options.loading": "Lendo as opções do pacote de shaders...",
"horizon.agent.copy_details": "Copiar detalhes da conexão",
"horizon.multiplayer.join": "Junte-se",
"horizon.multiplayer.cancel_reconnecting": "Cancelar reconexão",
"horizon.multiplayer.join_friend": "Junte-se a um amigo",
"horizon.multiplayer.invite_code": "Código de convite",
"horizon.multiplayer.relay": "Relé (opcional)",
"Preset": "Predefinido",
"LOD Distance": "Distância de LOD",
"Far Detail": "Detalhe distante",
"Cave Culling": "Abate em Caverna",
"Entity Culling": "Seleção de entidade",
"Chunk Updates": "Atualizações de blocos",
"Upload Budget": "Carregar orçamento",
"Sky": "Céu",
"Fog": "Nevoeiro",
"Weather": "Tempo",
"Animated Textures": "Texturas Animadas",
"Present Mode": "Modo Presente",
"Frame Pacing": "Ritmo de quadro",
"Worker Threads": "Threads de trabalho",
"Resolution Scale": "Escala de resolução",
"Upscaling": "Aumento de escala",
"Paper White": "Papel Branco",
"Peak Brightness": "Brilho máximo",
"Black Level": "Nível de preto",
"UI Brightness": "Brilho da IU",
"Battery Mode": "Modo Bateria",
"Graphics API": "API gráfica",
"Translucent Batching": "Lote Translúcido",
"Performance Overlay": "Sobreposição de desempenho",
"Full Detail Distance": "Distância detalhada completa",
"On": "Ligado",
"Off": "Desligado",
"Unlimited": "Ilimitado",
"Auto": "Automático",
"Custom": "Personalizado",
"Performance": "Desempenho",
"Balanced": "Equilibrado",
"Quality": "Qualidade",
"Ultra Performance": "Ultradesempenho",
"Native": "Nativo",
"Full": "Completo",
"Reduced": "Reduzido",
"Efficient": "Eficiente",
"Precise": "Preciso",
"Auto (VSync)": "Automático (VSync)",
"Mailbox": "Caixa de correio",
"Immediate": "Imediato",
"Vulkan": "Vulcano",
"DirectX 12": "DirectX12",
"FPS and Graph": "FPS e gráfico",
"No cost": "Sem custo",
"Low cost": "Baixo custo",
"Medium cost": "Custo médio",
"High cost": "Alto custo",
"Saves time": "Economiza tempo",
"Graphics": "Gráficos",
"Done": "Concluído",
"This feature is not yet available in Horizon.": "Este recurso ainda não está disponível no Horizon.",
"Your display or system doesn't offer HDR output.": "Seu monitor ou sistema não oferece saída HDR.",
"Turn HDR on to use it.": "Ative o HDR para usá-lo.",
"Your GPU or graphics API doesn't support it.": "Sua GPU ou API gráfica não oferece suporte.",
"%s chunks": "%s pedaços",
"%s per frame": "%s por quadro",
"%s MiB/frame": "%s MiB/quadro",
"%s KiB/frame": "%s KiB/quadro",
"Auto (%s)": "Automático (%s)",
"Full-detail terrain range. LOD Distance can extend local worlds farther.": "Gama de terreno com todos os detalhes. A distância LOD pode estender os mundos locais ainda mais.",
"Coarse distant terrain in local worlds. Integrated GPUs stop at 128 chunks.": "Terreno áspero e distante em mundos locais. As GPUs integradas param em 128 pedaços.",
"Reduced draws far terrain coarser: faster on this integrated GPU.": "Redução de desenhos em terrenos mais grosseiros: mais rápido nesta GPU integrada.",
"Reduced draws far terrain coarser, for GPUs it slows down.": "Reduzido atrai terrenos muito mais grosseiros, para GPUs ele fica mais lento.",
"Field of view. Wider shows more terrain at once.": "Campo de visão. Mais amplo mostra mais terreno ao mesmo tempo.",
"Caps frames per second; a cap saves power and heat.": "Limita quadros por segundo; uma tampa economiza energia e calor.",
"Waits for the display's refresh: no tearing, a little latency.": "Aguarda a atualização da tela: sem rasgos, um pouco de latência.",
"Size of menus and the HUD.": "Tamanho dos menus e do HUD.",
"Sets the options below together. Changing one makes it Custom.": "Define as opções abaixo juntas. Alterar um torna-o personalizado.",
"Lava, fire and sunlight shine brighter than white. Needs an HDR display.": "Lava, fogo e luz solar brilham mais que o branco. Precisa de uma tela HDR.",
"Your display's darkest black. 0 for OLED; LCDs glow a little.": "O preto mais escuro da sua tela. 0 para OLED; Os LCDs brilham um pouco.",
"How bright highlights get. Auto: the peak your system reports.": "Como os destaques ficam brilhantes. Automático: o pico relatado pelo seu sistema.",
"How bright white paper and menus look. Auto: your desktop's white.": "Como ficam os menus e o papel branco brilhante. Automático: sua área de trabalho fica branca.",
"How bright the HUD and menus are, against paper white.": "Quão brilhantes são o HUD e os menus, em contraste com o branco do papel.",
"How far mobs, crops and machines keep working. CPU time.": "Até onde mobs, colheitas e máquinas continuam trabalhando. Tempo de CPU.",
"How far away mobs and items are drawn, as a share of normal.": "A que distância os mobs e os itens são atraídos, em proporção ao normal.",
"Skips terrain hidden behind closed sections. Off costs a lot.": "Ignora terreno escondido atrás de seções fechadas. Fora custa muito.",
"Hides entities behind opaque blocks.": "Oculta entidades atrás de blocos opacos.",
"No entity occlusion culling.": "Nenhuma seleção de oclusão de entidade.",
"CPU occlusion test runs this frame.": "O teste de oclusão da CPU executa este quadro.",
"Occlusion checks run on a worker thread.": "As verificações de oclusão são executadas em um thread de trabalho.",
"Meshed sections uploaded per frame. Lower is smoother while loading.": "Seções em malha carregadas por quadro. Lower é mais suave durante o carregamento.",
"Soft shadows in corners. Costs chunk building time only.": "Sombras suaves nos cantos. Custa apenas o tempo de construção.",
"Smaller copies of block textures for distant terrain: less shimmer.": "Cópias menores de texturas de bloco para terrenos distantes: menos brilho.",
"Blends grass and water colours across biomes when building chunks.": "Mistura cores de grama e água em biomas ao construir pedaços.",
"Cloud layer: off, flat (fast) or 3D (fancy).": "Camada de nuvem: desativada, plana (rápida) ou 3D (extravagante).",
"How far clouds reach, in chunks.": "Quão longe as nuvens chegam, em pedaços.",
"Draws the sky, sun, moon and stars.": "Desenha o céu, o sol, a lua e as estrelas.",
"Distance fog. Off shows the edge of the loaded world.": "Nevoeiro à distância. Off mostra o limite do mundo carregado.",
"Draws rain and snow.": "Desenha chuva e neve.",
"How far rain and snow fall around you.": "Quão longe a chuva e a neve caem ao seu redor.",
"How many particles effects spawn.": "Quantos efeitos de partículas aparecem.",
"Round shadows under mobs and items.": "Sombras redondas sob mobs e itens.",
"Leaves with see-through gaps. Off draws them solid.": "Folhas com lacunas transparentes. Off os desenha sólidos.",
"Sorts water and glass more exactly behind each other.": "Classifica a água e o copo de maneira mais exata, um atrás do outro.",
"Which chunk rebuilds wait for the frame: none, nearby or yours.": "Quais pedaços são reconstruídos aguardando o quadro: nenhum, próximo ou seu.",
"Animates water, lava, fire and other moving textures.": "Anima água, lava, fogo e outras texturas em movimento.",
"World pixels per screen pixel. Below 100% is faster on the GPU.": "Pixels mundiais por pixel da tela. Abaixo de 100% é mais rápido na GPU.",
"Smooths jagged edges. FXAA: softer. TAA: smoothest, moving things may trail.": "Suaviza bordas irregulares. FXAA: mais suave. TAA: coisas mais suaves e em movimento podem deixar rastros.",
"Renders the world smaller and rebuilds it with TAA. Faster, softer.": "Torna o mundo menor e o reconstrói com TAA. Mais rápido, mais suave.",
"HDR output on an HDR display: lava, fire and sunlight shine brighter.": "Saída HDR em uma tela HDR: lava, fogo e luz solar brilham mais intensamente.",
"How frames reach the screen while VSync is off.": "Como os frames chegam à tela enquanto o VSync está desligado.",
"Efficient sleeps until the next frame; Precise spins, like vanilla.": "Eficiente dorme até o próximo quadro; Giros precisos, como baunilha.",
"Fills the screen (borderless).": "Preenche a tela (sem bordas).",
"Brightens dark places.": "Ilumina locais escuros.",
"Lowers the frame rate when minimised, or idle too.": "Reduz a taxa de quadros quando minimizado ou também inativo.",
"Sways the view while walking.": "Balança a visão enquanto caminha.",
"Fades newly loaded chunks in.": "Desaparece os pedaços recém-carregados.",
"Darkens the screen's edges.": "Escurece as bordas da tela.",
"Shows when the world saves.": "Mostra quando o mundo salva.",
"Shows attack cooldown.": "Mostra o tempo de espera do ataque.",
"60 FPS cap (30 in menus or unfocused), half the workers: less power.": "Limite de 60 FPS (30 em menus ou sem foco), metade dos trabalhadores: menos energia.",
"Threads that generate, light and mesh chunks. Next start.": "Fios que geram pedaços leves e de malha. Próximo começo.",
"Vulkan, then DirectX 12 (Windows) or OpenGL (Linux) where it fails. Next start.": "Vulkan, depois DirectX 12 (Windows) ou OpenGL (Linux) onde falha. Próximo começo.",
"Water and glass in one buffer: fewer draw calls, a bit more VRAM. Next start.": "Água e vidro em um buffer: menos chamadas de desenho, um pouco mais de VRAM. Próximo começo.",
"Mesh data sent to the GPU per frame. Lower is smoother while loading.": "Dados de malha enviados para a GPU por quadro. Lower é mais suave durante o carregamento.",
"Frame rate and frame times over the game, with a graph.": "Taxa de quadros e tempos de quadros ao longo do jogo, com gráfico.",
"horizon.multiplayer.finding_friend": "Encontrando o mundo do seu amigo...",
"horizon.multiplayer.not_signed_in": "Este servidor está em modo online. Faça login com sua conta da Microsoft no inicializador do Horizon para ingressar.",
"horizon.multiplayer.invalid_address": "Endereço de servidor inválido: %s",
"horizon.multiplayer.connected_friend_direct": "Conectado diretamente ao seu amigo...",
"horizon.multiplayer.connected_friend_relay": "Conectado ao seu amigo através do relé...",
"General": "Geral",
"Advanced": "Avançado",
"Undo": "Desfazer",
"Search options": "Opções de pesquisa",
"Shortcut": "Atalho",
"Distance": "Distância",
"Display": "Exibição",
"Sky and weather": "Céu e clima",
"Lighting and entities": "Iluminação e entidades",
"Textures": "Texturas",
"Image": "Imagem",
"Chunk loading": "Carregamento de pedaços",
"Culling": "Abate",
"Power": "Poder",
"Frames": "Molduras",
"Overlay": "Sobreposição",
"Output": "Saída",
"Brightness": "Brilho",
"How far you see, the window and the HUD.": "Quão longe você vê, a janela e o HUD.",
"The sky and weather, lighting, textures and the image.": "O céu e o clima, a iluminação, as texturas e a imagem.",
"Chunk loading, culling and power use.": "Carregamento de pedaços, seleção e uso de energia.",
"How frames reach the screen, and the performance overlay.": "Como os frames chegam à tela e a sobreposição de desempenho.",
"Brighter-than-white output on an HDR display.": "Saída mais brilhante que o branco em uma tela HDR.",
"Results for \"%s\"": "Resultados para \"%s\"",
"No settings match.": "Nenhuma configuração corresponde.",
"horizon.title.not_affiliated": "Não afiliado à Mojang ou Microsoft",
"horizon.extras.header.lighting": "Iluminação",
"horizon.extras.header.third_person": "Terceira pessoa",
"horizon.extras.header.particles": "Partículas",
"horizon.extras.header.inventory": "Inventário",
"horizon.extras.header.chat": "Bate-papo",
"horizon.extras.header.multiplayer": "Multijogador",
"horizon.extras.header.sound": "Som",
"horizon.extras.header.menus": "Cardápios",
"horizon.extras.fullbright": "Totalmente brilhante",
"horizon.extras.dynamic_lights": "Luzes dinâmicas",
"horizon.extras.own_name_tag": "Crachá próprio",
"horizon.extras.hide_block_particles": "Ocultar partículas de quebra de bloco",
"horizon.extras.auto_reconnect": "Reconectar automaticamente",
"horizon.extras.ui_sound_reserve": "Mantenha canais para sons da IU",
"horizon.extras.music_page": "Página de música",
"horizon.extras.mouse_tweaks": "Controles de ajustes do mouse",
"horizon.extras.mouse_tweaks_wheel": "A roda de rolagem move os itens",
"horizon.extras.sort": "Botões de classificação",
"horizon.extras.sort_key": "Chave de classificação",
"horizon.extras.no_ai": "Sem IA",
"horizon.extras.agent_control": "Controle de Agente",
"horizon.extras.discord_presence": "Presença rica em discórdia",
"horizon.extras.splitscreen": "Tela dividida",
"horizon.extras.chat_animation": "Bate-papo tranquilo",
"horizon.extras.chat_indicator": "Indicador de mensagem",
"horizon.extras.wheel_cycles_settings": "A roda de rolagem altera as configurações",
"horizon.extras.pack_browser": "Navegador de pacote de recursos",
"horizon.extras.fullbright.tooltip": "Mostre blocos e entidades em plena luz, mesmo em áreas escuras.",
"horizon.extras.dynamic_lights.tooltip": "Tochas e outras fontes de luz seguradas, deixadas cair ou em chamas iluminam os blocos ao seu redor.",
"horizon.extras.own_name_tag.tooltip": "Mostra seu nome acima de sua cabeça em terceira pessoa, como os outros jogadores o veem. Oculto quando o servidor oculta os nomes da sua equipe ou você fica invisível.",
"horizon.extras.hide_block_particles.tooltip": "Esconde as partículas de detritos que explodem de um bloco quebrado e se desintegram daquele que você extraiu. Outras partículas permanecem.",
"horizon.extras.auto_reconnect.tooltip": "Volta a um servidor após uma perda de conexão ou reinicialização, nunca após um kick ou ban.",
"horizon.extras.ui_sound_reserve.tooltip": "Os sons do mundo deixam 16 dos 247 canais de som livres, então uma enxurrada deles (uma grande explosão) não consegue silenciar os cliques no menu.",
"horizon.extras.music_page.tooltip": "Música e Sons recebe uma página Música...: reproduza qualquer faixa integrada agora ou desative uma para que o jogo pare de selecioná-la. Nada muda até que você desligue uma faixa.",
"horizon.extras.mouse_tweaks.tooltip": "Arrastar com o botão direito posiciona um por slot, arrastar com a esquerda reúne o item retido, Shift + arrastar com a esquerda move cada slot.",
"horizon.extras.mouse_tweaks_wheel.tooltip": "Para baixo envia um item do slot para o outro lado, para cima traz um de volta.",
"horizon.extras.sort.tooltip": "Classifica o inventário, baús, barris, baús finais e caixas shulker em ordem de tabulação criativa, mesclando pilhas.",
"horizon.extras.sort_key.tooltip": "Classifica a peça sob o cursor. Clique e pressione uma tecla; A fuga o desvincula.",
"horizon.extras.no_ai.tooltip": "Oculta e desativa todos os recursos de IA: controle de agente, horizonte-ctl e servidores MCP. O interruptor do lançador também.",
"horizon.extras.agent_control.tooltip": "Seu próprio agente de IA pode jogar este jogo por meio do horizonte-ctl ou de um cliente MCP, apenas neste computador.",
"horizon.extras.discord_presence.tooltip": "Mostra Jogando Horizon em seu perfil do Discord enquanto o Discord é executado: menus, single player ou multiplayer, a dimensão e o tempo de jogo. Nunca o nome de um mundo ou o endereço de um servidor.",
"Calibrate...": "Calibrar...",
"Calibrate Anyway...": "Calibrar de qualquer maneira...",
"Use Automatic Setup": "Usar configuração automática",
"Shortcut: %s": "Atalho: %s",
"Next": "Próximo",
"HDR Calibration %s/%s: %s": "Calibração HDR %s/%s: %s",
"Sets the three below full screen, one test picture at a time.": "Define as três imagens abaixo em tela cheia, uma imagem de teste por vez.",
"A key that opens this screen from the game. Not bound at first.": "Uma chave que abre esta tela do jogo. Não vinculado a princípio.",
"Your display didn't say how bright it gets: calibrate to set it up.": "Sua tela não informou o quão brilhante ela fica: calibre para configurá-la.",
"Already set up for your display. Only calibrate if HDR looks wrong.": "Já configurado para seu display. Calibre apenas se o HDR parecer errado.",
"Puts Peak Brightness and Paper White back to your display's setup.": "Coloca o brilho máximo e o branco do papel de volta na configuração do seu monitor.",
"Set up for your display. Leave on Auto unless it looks wrong.": "Configure para sua exibição. Deixe em Auto, a menos que pareça errado.",
"Lower it until the logo just disappears into the black.": "Abaixe-o até que o logotipo desapareça no preto.",
"Raise it until the logo just disappears into the bright square.": "Levante-o até que o logotipo desapareça no quadrado brilhante.",
"Make the card a white that's comfortable to look at for a long time, in the light you play in.": "Faça o cartão com um branco que seja confortável de olhar por muito tempo, na luz em que você joga.",
"horizon.splitscreen.profiles.forget": "Esqueça",
"horizon.splitscreen.profiles.create": "Criar",
"horizon.splitscreen.profiles.you": " - você",
"horizon.splitscreen.profiles.forget_named": "Esqueça %s",
"horizon.splitscreen.profiles.previous": "Anterior",
"horizon.splitscreen.profiles.next": "Próximo",
"horizon.splitscreen.profiles.new_button": "Novo perfil...",
"horizon.splitscreen.profiles.forget_title": "Esqueceu o perfil?",
"horizon.splitscreen.profiles.forget_leaves": "Ele sai da lista desta instância.",
"horizon.splitscreen.profiles.forget_kept": "O progresso e as configurações mundiais são mantidos.",
"horizon.splitscreen.profiles.new_title": "Novo perfil",
"horizon.splitscreen.profiles.name_hint": "Nome (3 a 16 letras, dígitos, _)",
"horizon.splitscreen.profiles.switch_title": "Mudar perfil",
"horizon.splitscreen.profiles.offline_note": "Perfis off-line pertencem a esta instância",
"horizon.splitscreen.profiles.move": "Mova-se para onde você joga",
"horizon.splitscreen.profiles.move_place": "Mova-se para onde você joga: %s",
"horizon.friends.title": "Jogue com amigos",
"horizon.friends.hint": "Amigos colam o código após o botão Amigos da tela de título, no Direct Connection ou na página Play do inicializador.",
"horizon.friends.copied": "Copiado",
"horizon.friends.copy_code": "Copiar código",
"horizon.friends.stop_sharing": "Pare de compartilhar",
"horizon.friends.none_yet": "Nenhum amigo aqui ainda.",
"horizon.friends.here_now": "Aqui agora: %s",
"horizon.friends.share_intro": "Compartilhe este mundo por meio de um código de convite: ele abre para LAN e amigos na internet entram com o código. Nenhum servidor nosso está envolvido.",
"horizon.friends.start_sharing": "Comece a compartilhar",
"horizon.friends.troubleshooting": "Solução de problemas...",
"horizon.friends.stopped": "Parou de compartilhar o código de convite.",
"horizon.friends.short_code_changed": "Alguém continuou tentando um código curto errado, então ele mudou.",
"horizon.friends.wrong_code": "Alguém tentou um código errado.",
"horizon.friends.code_ready": "Seu código de convite está pronto: Menu do Jogo, Jogue com Amigos. Copie e envie para seus amigos.",
"horizon.friends.share_failed": "Não foi possível compartilhar o mundo: %s",
"horizon.friends.finding_route": "Descobrir como os amigos podem entrar em contato com você…",
"horizon.osk.shift": "Mudança",
"horizon.osk.space": "Espaço",
"horizon.osk.delete": "Excluir",
"horizon.osk.type": "Tipo",
"horizon.osk.symbols": "Símbolos",
"horizon.osk.close": "Fechar",
"horizon.extras.chat_animation.tooltip": "Uma nova linha de bate-papo aparece da esquerda enquanto desaparece, em vez de aparecer inteira.",
"horizon.extras.chat_indicator.tooltip": "A barra colorida à esquerda de uma linha de bate-papo.",
"horizon.extras.wheel_cycles_settings.tooltip": "A roda de rolagem sobre um botão nas configurações altera seu valor, como no vanilla. Desligado, a roda apenas rola a lista.",
"horizon.extras.pack_browser.tooltip": "Select Resource Packs obtém um botão Adicionar que pesquisa Modrinth e instala um pacote em sua pasta de pacotes. Desligado, o jogo nunca entra em contato com Modrinth.",
"horizon.extras.splitscreen.tooltip": "Num mundo, outro controlador pode entrar como novo jogador: pressione A quando solicitado e escolha um perfil e onde jogar.",
"horizon.splitscreen.setup.monitor": "Monitorar %s",
"horizon.splitscreen.setup.monitor_unknown": "um monitor",
"horizon.splitscreen.setup.window": "Janela %s",
"horizon.splitscreen.setup.new_window": "Nova janela",
"horizon.splitscreen.setup.fill_monitor": "Preencha %s",
"horizon.splitscreen.setup.done": "Concluído",
"horizon.splitscreen.setup.on": "Ligado",
"horizon.splitscreen.setup.off": "Desligado",
"horizon.splitscreen.setup.player": "Jogador %s",
"horizon.splitscreen.setup.revert": "Reverter",
"horizon.splitscreen.setup.apply": "Aplicar",
"horizon.splitscreen.setup.warning.empty_main": "Ninguém brinca na Janela 1: ela se esconde",
"horizon.splitscreen.setup.warning.empty_close": "Ninguém joga na janela %s: ela fecha no Apply",
"horizon.splitscreen.setup.warning.empty_new": "Ninguém joga na janela %s: ela não abre",
"horizon.splitscreen.setup.warning.on_main": "A janela %s preenche o monitor da Janela 1: seus jogadores jogam na Janela 1",
"horizon.splitscreen.setup.warning.unplugged": "O monitor da janela %s não está conectado: seus jogadores jogam na janela 1",
"horizon.splitscreen.setup.status.off": "A tela dividida está desativada.",
"horizon.splitscreen.setup.status.enable_hint": "Ligue-o e pressione um botão em outro controlador em um mundo.",
"horizon.splitscreen.setup.status.join_hint": "Pressione A para entrar e escolher um perfil.",
"horizon.splitscreen.setup.status.idle": "Tela dividida inativa",
"horizon.splitscreen.setup.status.alone": "Nenhum outro jogador local.",
"horizon.splitscreen.setup.status.solo_controls": "Os controles Solo e o feedback do controlador permanecem inalterados.",
"horizon.splitscreen.setup.window_empty": "Janela %s: vazia",
"horizon.splitscreen.setup.note.select": "Clique em um player ou arraste-o para uma janela ou monitor.",
"horizon.splitscreen.setup.note.apply": "Inscreva-se para jogar desta forma, Reverta para desfazer.",
"horizon.splitscreen.setup.note.place": "Onde %s deveria jogar?",
"horizon.splitscreen.setup.this_player": "este jogador",
"horizon.splitscreen.setup.switch_disabled": "A tela dividida é desativada quando os outros saem (menu de pausa).",
"horizon.splitscreen.setup.window_place": "Janela %s (%s de %s)",
"horizon.splitscreen.setup.names": "Nomes",
"horizon.splitscreen.setup.identify": "Identificar",
"horizon.splitscreen.setup.layout.two": "2 compartilhamento: %s",
"horizon.splitscreen.setup.layout.three": "3 compartilhamento: %s",
"horizon.splitscreen.setup.layout.two.0": "Automático",
"horizon.splitscreen.setup.layout.two.1": "Lado a lado",
"horizon.splitscreen.setup.layout.two.2": "Superior e inferior",
"horizon.splitscreen.setup.layout.three.0": "Um largo no topo",
"horizon.splitscreen.setup.layout.three.1": "Um alto à esquerda",
"horizon.splitscreen.setup.layout.three.2": "Lado a lado",
"horizon.splitscreen.setup.help.player": "Clique ou arraste %s para movê-los.",
"horizon.splitscreen.setup.help.layout_auto": "%s (lado a lado quando a janela é larga). Pressione para alterar.",
"horizon.splitscreen.setup.help.layout": "%s. Pressione para alterar.",
"horizon.splitscreen.setup.help.switch": "Tela dividida para este computador, ligada ou desligada.",
"horizon.splitscreen.setup.help.identify": "A visualização de cada jogador mostra em qual janela ele está.",
"horizon.splitscreen.setup.help.names": "O nome de cada jogador no canto da visão.",
"horizon.splitscreen.setup.help.revert": "Desfaça as alterações ainda não aplicadas.",
"horizon.splitscreen.setup.help.apply": "Jogue da maneira que o mapa mostra.",
"horizon.splitscreen.setup.help.unchanged": "Nada mudou ainda.",
"horizon.splitscreen.setup.give_up_pad": "Almofada de desistência",
"horizon.splitscreen.prompt.controller_connected": "Controlador conectado",
"horizon.splitscreen.prompt.controller_disconnected": "Controlador desconectado",
"horizon.splitscreen.prompt.controller_disconnected.hint": "Reconecte-o ou pressione um botão em outro",
"horizon.splitscreen.prompt.join.one": "%s quer participar",
"horizon.splitscreen.prompt.join.many": "%s controladores desejam participar",
"horizon.splitscreen.prompt.join.yes": "Junte-se",
"horizon.splitscreen.prompt.join.as_p1": "Jogue como P1",
"horizon.splitscreen.prompt.join.no": "Não",
"horizon.splitscreen.prompt.lost": "%s: controlador desconectado",
"horizon.splitscreen.prompt.lost.use_another": "Use outro",
"horizon.splitscreen.prompt.lost.leave": "Sair",
"horizon.splitscreen.setup.help.give_up_pad": "Seu controlador para de dirigir você e é convidado a entrar (A).",
"horizon.splitscreen.setup.note.held_at": "%s a %s: A deixa cair aqui, B coloca de volta.",
"horizon.splitscreen.setup.note.held": "%s pegou: esquerda/direita escolhe onde, A deixa cair, B coloca de volta.",
"Hides models behind opaque blocks. Async checks off-thread; entities tick.": "Oculta modelos atrás de blocos opacos. Async verifica fora do thread; entidades marcam.",
"Block Entities": "Bloquear entidades",
"Shulker Boxes": "Caixas Shulker",
"Reuses settled boxes; lid movement stays animated.": "Reutiliza caixas assentadas; o movimento da tampa permanece animado.",
"Signs": "Sinais",
"Reuses sign text until text, light, or font changes.": "Reutiliza o texto do sinal até que o texto, a luz ou a fonte sejam alterados.",
"Decorated Pots": "Vasos Decorados",
"Reuses still pots; break wobble and sherd changes redraw.": "Reaproveita potes imóveis; quebrar oscilação e mudanças de fragmento redesenhar.",
"Bells": "Sinos",
"Reuses still bells; ringing stays animated.": "Reutiliza ainda sinos; o toque permanece animado.",
"Chests": "Baús",
"Reuses closed chests; moving lids stay animated.": "Reutiliza baús fechados; as tampas móveis permanecem animadas.",
"Banners": "Bandeiras",
"Reuses poles; flags and pattern layers still update.": "Reutiliza postes; sinalizadores e camadas de padrão ainda são atualizados.",
"Copper Golem Statues": "Estátuas de Golem de Cobre",
"Reuses statue geometry until its block state changes.": "Reutiliza a geometria da estátua até que o estado do bloco mude.",
"Leaf Culling": "Abate de folhas",
"Every leaf face. Vanilla's fancy leaves.": "Cada rosto de folha. Folhas elegantes de baunilha.",
"Distant Plant Dither": "Vibração de plantas distantes",
"Keeps fine plants in high-res packs from fading far away.": "Evita que plantas finas em embalagens de alta resolução desapareçam ao longe.",
"Screenshot Quality": "Qualidade da captura de tela",
"F2 screenshots at this many times the game's resolution. Higher takes longer.": "Capturas de tela F2 com muitas vezes a resolução do jogo. Maior leva mais tempo.",
"Frame Generation": "Geração de quadros",
"Shows a made-up frame between each two real ones: smoother, a little more lag.": "Mostra um quadro composto entre cada dois quadros reais: mais suave, um pouco mais de atraso.",
"Shadow Cache": "Cache de sombra",
"Reuses the pack shadow map when sun, view and world match. Off by default.": "Reutiliza o mapa de sombras do pacote quando o sol, a visão e o mundo correspondem. Desativado por padrão.",
"Find BlueMap": "Encontre o BlueMap",
"On servers, finds their BlueMap web map for far terrain. Next join.": "Nos servidores, encontra seu mapa da web BlueMap para terrenos distantes. Próxima adesão.",
"BlueMap Radius": "Raio BlueMap",
"How far around you BlueMap tiles are downloaded. Next join.": "A que distância ao seu redor os blocos do BlueMap são baixados. Próxima adesão.",
"Synchronous": "Síncrono",
"Asynchronous": "Assíncrono",
"Solid": "Sólido",
"Solid Aggressive": "Sólido Agressivo",
"Hollow": "Oco",
"Leaves fully inside a canopy draw solid: fewer see-through layers.": "As folhas totalmente dentro de um dossel ficam sólidas: menos camadas transparentes.",
"Leaves with one open side draw solid too: faster, chunkier edges.": "Folhas com um lado aberto também ficam sólidas: bordas mais rápidas e grossas.",
"Drops faces between leaves: faster, but gaps look through.": "Deixa cair as faces entre as folhas: mais rápido, mas as lacunas são visíveis.",
"Hotbar: Previous Slot": "Hotbar: slot anterior",
"Hotbar: Next Slot": "Hotbar: próximo slot",
"horizon.agent.connected.one": "Conectado: 1 conexão de agente",
"horizon.agent.connected.many": "Conectado: %s conexões de agente",
"horizon.agent.connected.one_ago": "Conectado: 1 conexão de agente, último comando há %s s",
"horizon.agent.connected.many_ago": "Conectado: %s conexões de agente, último comando há %s s",
"horizon.agent.waiting": "Esperando por um agente.",
"horizon.agent.off": "Desativado: os agentes não podem acessar este jogo.",
"horizon.agent.session_opened": "Aberto para esta sessão pelo programa que iniciou o jogo.",
"horizon.agent.socket": "Socket: %s (copie os detalhes do caminho completo)",
"horizon.agent.local_only": "Somente local: agentes neste computador, nunca na rede.",
"%s nits": "%s lêndeas",
"Auto (%s nits)": "Automático (%s lêndeas)",
"%.2f nits": "%.2f lêndeas",
"Hides models behind opaque blocks. Entities update. Off with custom packs.": "Oculta modelos atrás de blocos opacos. Atualização de entidades. Saia com pacotes personalizados.",
"horizon.extras.repro_keys": "Atalhos de gravação",
"horizon.extras.repro_keys.tooltip": "F3+R inicia ou interrompe uma gravação de reprodução e F3+E grava seu pacote. Desativado por padrão: uma gravação copia o mundo.",
"horizon.agent.record_session": "Iniciar sessão de gravação",
"horizon.agent.record_stop": "Parar a sessão de gravação",
"horizon.agent.export_repro": "Exportar pacote de reprodução",
"horizon.repro.started": "A gravação começou; F3+R interrompe e grava o pacote.",
"horizon.repro.stopped": "Gravação interrompida: %s",
"horizon.repro.bundle": "Pacote de reprodução: %s",
"horizon.repro.error": "Reprodução: %s",
"horizon.repro.no_recording": "Ainda não há gravação para exportar.",
"horizon.repro.replay_started": "Repetição iniciada: %s",
"horizon.pack.addInfo": "Adicione um pacote de recursos do Modrinth",
"horizon.pack.addWorking": "Perguntando a Modrinth...",
"horizon.pack.addNone": "Nenhum pacote de recursos encontrado",
"horizon.pack.addTitle": "Adicionar um pacote de recursos",
"horizon.pack.install": "Instalar",
"horizon.pack.installing": "Instalando",
"horizon.pack.installed": "Instalado",
"horizon.pack.search": "Pesquisar",
"horizon.pack.searchHint": "ProcurarModrinth...",
"horizon.pack.filters": "Filtros",
"horizon.pack.filter.realistic": "Realista",
"horizon.pack.filter.simplistic": "Simplista",
"horizon.pack.filter.vanillaLike": "Semelhante à baunilha",
"horizon.pack.addFailed": "O pacote não pôde ser adicionado: %s",
"horizon.extras.header.cosmetics": "Cosméticos",
"horizon.extras.cosmetics_mine": "Meus cosméticos",
"horizon.extras.cosmetics_mine.tooltip": "Oculto: todo jogador do Horizon vê você sem seus cosméticos, inclusive você. A mesma opção do guarda-roupa do lançador.",
"horizon.extras.cosmetics_others": "Cosméticos de outros jogadores",
"horizon.extras.cosmetics_others.tooltip": "O que os outros jogadores do Horizon usam: tudo, apenas os estilos dos crachás ou nada. Escondido, o jogo nunca pergunta o que eles vestem.",
"horizon.extras.cosmetics_auras": "Auras e trilhas de outros",
"horizon.extras.cosmetics_auras.tooltip": "Auras e trilhas que outros jogadores usam. Desativado por padrão.",
"horizon.extras.cosmetics.shown": "Mostrado",
"horizon.extras.cosmetics.hidden": "Oculto",
"horizon.extras.cosmetics.name_tags": "Somente tags de nome"
}
@@ -198,6 +198,10 @@
"horizon.shader_options.open": "Настройки шейдеров…",
"horizon.shader_options.profile": "Профиль",
"horizon.shader_options.loading": "Чтение настроек набора шейдеров…",
"Particle Culling": "Particle Culling",
"Draws every particle.": "Draws every particle.",
"Skips offscreen, subpixel and terrain-hidden particles.": "Skips offscreen, subpixel and terrain-hidden particles.",
"Skips offscreen, subpixel and terrain-hidden particles with less render-thread work.": "Skips offscreen, subpixel and terrain-hidden particles with less render-thread work.",
"General": "Общие",
"Advanced": "Дополнительно",
"Undo": "Отменить",
@@ -0,0 +1,461 @@
{
"horizon.options.controller": "Styrenhet",
"horizon.options.adaptive_triggers": "Adaptiva triggers",
"horizon.options.lightbar": "Ljusfält",
"horizon.options.look_sensitivity": "Siktkänslighet",
"horizon.options.invert_x": "Invertera sikt X",
"horizon.options.invert_y": "Invertera sikt Y",
"horizon.options.sneak_button": "Smygknapp",
"horizon.options.move_deadzone": "Dödzon för rörelse",
"horizon.options.look_deadzone": "Dödzon för sikt",
"horizon.options.button_glyphs": "Knapp Glyfer",
"horizon.options.menu_navigation": "Menynavigering",
"horizon.options.on_screen_keyboard": "Skärmtangentbord",
"horizon.options.chat_delay": "Chattfördröjning",
"horizon.options.lightbar.health": "Hälsa",
"horizon.options.menu_focus": "Fokusera",
"horizon.options.menu_pointer": "Pekare",
"horizon.options.keyboard.steam": "Ånga",
"horizon.options.unavailable": "Den här funktionen är ännu inte tillgänglig i Horizon.",
"horizon.options.search": "Sökinställningar...",
"horizon.pages.shader_packs": "Shader-paket",
"horizon.pages.shader_options": "Skuggningsalternativ",
"horizon.pages.controller": "Kontrollinställningar",
"horizon.pages.controller_binds": "Controller binder",
"horizon.pages.settings": "Horizon-inställningar",
"horizon.pages.agent": "AI-agent",
"horizon.split.leave": "Lämna",
"horizon.pages.split_settings": "Inställningar för delad skärm",
"horizon.pages.split_profiles": "Vem spelar?",
"horizon.pages.split_setup": "Inställning av delad skärm",
"horizon.pages.music": "Musik",
"horizon.pages.music.menu": "Meny",
"horizon.pages.music.overworld": "Övervärlden",
"horizon.pages.music.creative": "Kreativt",
"horizon.pages.music.underwater": "Under vattnet",
"horizon.pages.music.end": "Slutet",
"horizon.pages.music.credits": "Krediter",
"horizon.pages.music.overworld_biomes": "Övervärldsbiomer",
"horizon.pages.music.nether_biomes": "Nedre biomer",
"horizon.pages.music.end_biomes": "Sluta biomer",
"horizon.pages.music.other": "Annan musik",
"horizon.pages.music.empty": "Inga musikspår: spelets ljud laddas inte.",
"horizon.pages.music.tooltip": "De inbyggda spåren, efter situation: spela ett nu, eller stäng av något så att spelet slutar välja det.",
"horizon.pages.settings.tooltip": "Horizons egna inställningar: grafik, kontroller, extrafunktioner och mods.",
"horizon.pages.graphics.tooltip": "Grafik, helt enkelt: varje inställning säger vad den kostar.",
"horizon.pages.graphics_advanced.tooltip": "Varje grafikinställning, Horizons ingår, med vad varje kostar.",
"horizon.pages.controller.tooltip": "Styrenheter: deras knappar, spakar, vibrationer och menynavigering.",
"horizon.pages.extras.tooltip": "Valfria tillägg, alla avstängda som standard: spelet förblir vanilj tills du slår på ett.",
"horizon.pages.agent.tooltip": "Låt din egen AI-agent spela: horizon-ctl och MCP-klienter på den här datorn.",
"horizon.pages.split_profiles.tooltip": "Vem spelar: en profil som finns i den här spelmappen.",
"horizon.pages.split_setup.tooltip": "Fönstren och bildskärmarna, och vem spelar var.",
"horizon.pages.shader_packs.tooltip": "Shader-paket från shaderpacks-mappen: Horizons egna och de i shaders/-formatet. En springer i taget.",
"horizon.pages.mods.tooltip": "Mods gjorda för Horizon, från mappen horizon-mods. Varje körs i en sandlåda och förblir avstängd tills du slår på den.",
"horizon.pages.open.graphics": "Grafik...",
"horizon.pages.open.graphics_advanced": "Avancerad grafik...",
"horizon.pages.open.shader_packs": "Shader-paket...",
"horizon.pages.open.controller": "Kontrollinställningar...",
"horizon.pages.open.split_setup": "Delad skärm...",
"horizon.pages.open.extras": "Extra...",
"horizon.pages.open.agent": "AI-agent...",
"horizon.pages.open.horizon_graphics": "Horizon-grafik...",
"horizon.pages.open.controller_binds": "Styrenheten binder...",
"horizon.pages.open.horizon_settings": "Horizon-inställningar...",
"horizon.pages.open.music": "Musik...",
"horizon.mods.empty": "Inga mods: lägg .hmod-filer i mappen horizon-mods",
"horizon.mods.stopped": " (Stoppade)",
"horizon.mods.not_built": " (Ej byggd)",
"horizon.mods.settings": "Inställningar",
"horizon.mods.in_world": " (låt världen förändras)",
"horizon.mods.open_folder": "Öppna Mod-mappen",
"horizon.shader_packs.empty": "Inga shader-paket: lägg dem i shaderpacks-mappen",
"horizon.shader_options.open": "Skuggningsalternativ...",
"horizon.shader_options.profile": "Profil",
"horizon.shader_options.loading": "Läser shader-paketets alternativ...",
"horizon.agent.copy_details": "Kopiera anslutningsinformation",
"horizon.multiplayer.join": "Gå med",
"horizon.multiplayer.cancel_reconnecting": "Avbryt Återansluter",
"horizon.multiplayer.join_friend": "Gå med i en vän",
"horizon.multiplayer.invite_code": "Inbjudningskod",
"horizon.multiplayer.relay": "Relä (valfritt)",
"Preset": "Förinställd",
"LOD Distance": "LOD Avstånd",
"Far Detail": "Lång detalj",
"Cave Culling": "Grottavlivning",
"Chunk Updates": "Bituppdateringar",
"Upload Budget": "Ladda upp budget",
"Fog": "Dimma",
"Weather": "Väder",
"Animated Textures": "Animerade texturer",
"Present Mode": "Presentationsläge",
"Worker Threads": "Arbetstrådar",
"Resolution Scale": "Upplösningsskala",
"Anti-aliasing": "Kantutjämning",
"Upscaling": "Uppskalning",
"Paper White": "Papper Vit",
"Peak Brightness": "Högsta ljusstyrka",
"Black Level": "Svart nivå",
"UI Brightness": "UI-ljusstyrka",
"Battery Mode": "Batteriläge",
"Graphics API": "Grafik API",
"Translucent Batching": "Genomskinlig batchning",
"Full Detail Distance": "Fullständig detalj avstånd",
"On": "På",
"Off": "Av",
"Unlimited": "Obegränsad",
"Custom": "Anpassad",
"Performance": "Prestanda",
"Balanced": "Balanserad",
"Quality": "Kvalitet",
"Ultra Performance": "Ultraprestanda",
"Native": "Infödd",
"Reduced": "Minskad",
"Efficient": "Effektiv",
"Precise": "Exakt",
"Mailbox": "Brevlåda",
"Immediate": "Omedelbart",
"FPS and Graph": "FPS och graf",
"No cost": "Ingen kostnad",
"Low cost": "Låg kostnad",
"Medium cost": "Medium kostnad",
"High cost": "Hög kostnad",
"Saves time": "Sparar tid",
"Graphics": "Grafik",
"Done": "Klart",
"This feature is not yet available in Horizon.": "Den här funktionen är ännu inte tillgänglig i Horizon.",
"Your display or system doesn't offer HDR output.": "Din bildskärm eller ditt system erbjuder inte HDR-utgång.",
"Turn HDR on to use it.": "Slå på HDR för att använda den.",
"Your GPU or graphics API doesn't support it.": "Din GPU eller grafik-API stöder det inte.",
"%s chunks": "%s bitar",
"%s per frame": "%s per bildruta",
"%s MiB/frame": "%s MiB/bildruta",
"%s KiB/frame": "%s KiB/ram",
"Full-detail terrain range. LOD Distance can extend local worlds farther.": "Terrängområde med fullständiga detaljer. LOD Distance kan sträcka lokala världar längre.",
"Coarse distant terrain in local worlds. Integrated GPUs stop at 128 chunks.": "Grov avlägsen terräng i lokala världar. Integrerade GPU:er stannar vid 128 bitar.",
"Reduced draws far terrain coarser: faster on this integrated GPU.": "Minskat drar långt grövre terräng: snabbare med denna integrerade GPU.",
"Reduced draws far terrain coarser, for GPUs it slows down.": "Minskad drar mycket grövre terräng, för GPU:er saktar den ner.",
"Field of view. Wider shows more terrain at once.": "Synfält. Bredare visar mer terräng på en gång.",
"Caps frames per second; a cap saves power and heat.": "Kapar bildrutor per sekund; ett lock sparar ström och värme.",
"Waits for the display's refresh: no tearing, a little latency.": "Väntar på skärmens uppdatering: ingen rivning, lite latens.",
"Size of menus and the HUD.": "Storlek på menyer och HUD.",
"Sets the options below together. Changing one makes it Custom.": "Ställer in alternativen nedan tillsammans. Att ändra en gör det Custom.",
"Lava, fire and sunlight shine brighter than white. Needs an HDR display.": "Lava, eld och solljus lyser starkare än vitt. Behöver en HDR-skärm.",
"Your display's darkest black. 0 for OLED; LCDs glow a little.": "Din skärm är mörkast svart. 0 för OLED; LCD-skärmar lyser lite.",
"How bright highlights get. Auto: the peak your system reports.": "Hur ljusa höjdpunkter blir. Auto: den topp som ditt system rapporterar.",
"How bright white paper and menus look. Auto: your desktop's white.": "Så ljust vitt papper och menyer ser ut. Auto: ditt skrivbord är vitt.",
"How bright the HUD and menus are, against paper white.": "Hur ljusa HUD och menyer är, mot pappersvitt.",
"How far mobs, crops and machines keep working. CPU time.": "Hur långt hopar, grödor och maskiner fortsätter att arbeta. CPU-tid.",
"How far away mobs and items are drawn, as a share of normal.": "Hur långt bort mobs och föremål dras, som andel av normala.",
"Skips terrain hidden behind closed sections. Off costs a lot.": "Hoppar över terräng gömd bakom stängda sektioner. Off kostar mycket.",
"Hides entities behind opaque blocks.": "Döljer enheter bakom ogenomskinliga block.",
"No entity occlusion culling.": "Ingen entitetsocklusion utslaktning.",
"CPU occlusion test runs this frame.": "CPU-ocklusionstest kör denna ram.",
"Occlusion checks run on a worker thread.": "Ocklusionskontroller körs på en arbetstråd.",
"Meshed sections uploaded per frame. Lower is smoother while loading.": "Meshed sektioner uppladdade per bildruta. Lägre är smidigare vid lastning.",
"Soft shadows in corners. Costs chunk building time only.": "Mjuka skuggor i hörnen. Kostar bara en del byggtid.",
"Smaller copies of block textures for distant terrain: less shimmer.": "Mindre kopior av blocktexturer för avlägsen terräng: mindre skimmer.",
"Blends grass and water colours across biomes when building chunks.": "Blandar gräs och vattenfärger över biomer när du bygger bitar.",
"Cloud layer: off, flat (fast) or 3D (fancy).": "Molnlager: av, platt (snabb) eller 3D (fancy).",
"How far clouds reach, in chunks.": "Hur långt molnen når, i bitar.",
"Draws the sky, sun, moon and stars.": "Ritar himlen, solen, månen och stjärnorna.",
"Distance fog. Off shows the edge of the loaded world.": "Distansdimma. Off visar kanten på den laddade världen.",
"Draws rain and snow.": "Ritar regn och snö.",
"How far rain and snow fall around you.": "Hur långt regn och snö faller omkring dig.",
"How many particles effects spawn.": "Hur många partiklar effekter spawn.",
"Round shadows under mobs and items.": "Runda skuggor under mobs och föremål.",
"Leaves with see-through gaps. Off draws them solid.": "Blad med genomskinliga mellanrum. Off drar dem fast.",
"Sorts water and glass more exactly behind each other.": "Sorterar vatten och glas mer exakt efter varandra.",
"Which chunk rebuilds wait for the frame: none, nearby or yours.": "Vilken chunk-ombyggnad väntar på ramen: ingen, i närheten eller din.",
"Animates water, lava, fire and other moving textures.": "Animerar vatten, lava, eld och andra rörliga texturer.",
"World pixels per screen pixel. Below 100% is faster on the GPU.": "Världspixlar per skärmpixel. Under 100% är snabbare på GPU.",
"Smooths jagged edges. FXAA: softer. TAA: smoothest, moving things may trail.": "Jämnar ut taggiga kanter. FXAA: mjukare. TAA: smidigaste, rörliga saker kan spåra.",
"Renders the world smaller and rebuilds it with TAA. Faster, softer.": "Gör världen mindre och bygger om den med TAA. Snabbare, mjukare.",
"HDR output on an HDR display: lava, fire and sunlight shine brighter.": "HDR-utgång på en HDR-skärm: lava, eld och solljus lyser starkare.",
"How frames reach the screen while VSync is off.": "Hur ramar når skärmen medan VSync är avstängt.",
"Efficient sleeps until the next frame; Precise spins, like vanilla.": "Effektiv sömn till nästa bildruta; Exakt snurr, som vanilj.",
"Fills the screen (borderless).": "Fyller skärmen (kantlös).",
"Brightens dark places.": "Ljusar upp mörka platser.",
"Lowers the frame rate when minimised, or idle too.": "Sänker bildfrekvensen när den är minimerad, eller inaktiv också.",
"Sways the view while walking.": "Svänger utsikten när du går.",
"Fades newly loaded chunks in.": "Tonar in nyladdade bitar.",
"Darkens the screen's edges.": "Gör skärmens kanter mörkare.",
"Shows when the world saves.": "Visar när världen räddar.",
"Shows attack cooldown.": "Visar nedkylning av attacken.",
"60 FPS cap (30 in menus or unfocused), half the workers: less power.": "60 FPS cap (30 i menyer eller ofokuserad), hälften av arbetarna: mindre kraft.",
"Threads that generate, light and mesh chunks. Next start.": "Trådar som genererar, lätta och maska bitar. Nästa start.",
"Vulkan, then DirectX 12 (Windows) or OpenGL (Linux) where it fails. Next start.": "Vulkan, sedan DirectX 12 (Windows) eller OpenGL (Linux) där det misslyckas. Nästa start.",
"Water and glass in one buffer: fewer draw calls, a bit more VRAM. Next start.": "Vatten och glas i en buffert: färre dragsamtal, lite mer VRAM. Nästa start.",
"Mesh data sent to the GPU per frame. Lower is smoother while loading.": "Mesh-data skickas till GPU:n per bildruta. Lägre är smidigare vid lastning.",
"Frame rate and frame times over the game, with a graph.": "Bildfrekvens och bildtider över spelet, med en graf.",
"horizon.multiplayer.finding_friend": "Att hitta din väns värld...",
"horizon.multiplayer.not_signed_in": "Denna server är i onlineläge. Logga in med ditt Microsoft-konto i Horizon launcher för att gå med i det.",
"horizon.multiplayer.invalid_address": "Ogiltig serveradress: %s",
"horizon.multiplayer.connected_friend_direct": "Ansluten direkt till din vän...",
"horizon.multiplayer.connected_friend_relay": "Ansluten till din vän via reläet...",
"General": "Allmänt",
"Advanced": "Avancerat",
"Undo": "Ångra",
"Search options": "Sökalternativ",
"Shortcut": "Genväg",
"Distance": "Avstånd",
"Interface": "Gränssnitt",
"Sky and weather": "Himmel och väder",
"Lighting and entities": "Belysning och enheter",
"Textures": "Texturer",
"Image": "Bild",
"Chunk loading": "Chunk laddning",
"Culling": "Avlivning",
"Power": "Kraft",
"Frames": "Ramar",
"Overlay": "Överlägg",
"Output": "Utgång",
"Brightness": "Ljusstyrka",
"How far you see, the window and the HUD.": "Hur långt du ser, fönstret och HUD.",
"The sky and weather, lighting, textures and the image.": "Himlen och väder, ljus, texturer och bilden.",
"Chunk loading, culling and power use.": "Chunk loading, utslaktning och kraftanvändning.",
"How frames reach the screen, and the performance overlay.": "Hur ramar når skärmen och prestandaöverlägget.",
"Brighter-than-white output on an HDR display.": "Ljusare än vit utgång på en HDR-skärm.",
"Results for \"%s\"": "Resultat för \"%s\"",
"No settings match.": "Inga inställningar matchar.",
"horizon.title.not_affiliated": "Ej ansluten till Mojang eller Microsoft",
"horizon.extras.header.lighting": "Belysning",
"horizon.extras.header.third_person": "Tredje person",
"horizon.extras.header.particles": "Partiklar",
"horizon.extras.header.inventory": "Inventering",
"horizon.extras.header.chat": "Chatta",
"horizon.extras.header.sound": "Ljud",
"horizon.extras.header.menus": "Menyer",
"horizon.extras.dynamic_lights": "Dynamiska lampor",
"horizon.extras.own_name_tag": "Egen namnskylt",
"horizon.extras.hide_block_particles": "Göm blockbrytande partiklar",
"horizon.extras.auto_reconnect": "Återanslut automatiskt",
"horizon.extras.ui_sound_reserve": "Behåll kanaler för UI-ljud",
"horizon.extras.music_page": "Musiksida",
"horizon.extras.mouse_tweaks": "Mouse Tweaks kontroller",
"horizon.extras.mouse_tweaks_wheel": "Scrollhjul flyttar objekt",
"horizon.extras.sort": "Sorteringsknappar",
"horizon.extras.sort_key": "Sorteringsnyckel",
"horizon.extras.no_ai": "Ingen AI",
"horizon.extras.agent_control": "Agentkontroll",
"horizon.extras.discord_presence": "Discord rik närvaro",
"horizon.extras.splitscreen": "Delad skärm",
"horizon.extras.chat_animation": "Smidig chatt",
"horizon.extras.chat_indicator": "Meddelandeindikator",
"horizon.extras.wheel_cycles_settings": "Skrollhjul ändrar inställningar",
"horizon.extras.pack_browser": "Resurspaket webbläsare",
"horizon.extras.fullbright.tooltip": "Visa block och enheter i fullt ljus, även i mörka områden.",
"horizon.extras.dynamic_lights.tooltip": "Facklor och andra ljuskällor som hålls, tappas eller brinner tänder blocken runt dem.",
"horizon.extras.own_name_tag.tooltip": "Visar ditt namn ovanför ditt huvud i tredje person, som andra spelare ser det. Dold när servern döljer ditt lags namn eller om du är osynlig.",
"horizon.extras.hide_block_particles.tooltip": "Döljer skräppartiklarna som spricker från ett trasigt block och smulas av det du minar. Andra partiklar stannar kvar.",
"horizon.extras.auto_reconnect.tooltip": "Återansluter till en server efter en förlorad anslutning eller en omstart, aldrig efter en kick eller förbud.",
"horizon.extras.ui_sound_reserve.tooltip": "Ljud i världen lämnar 16 av de 247 ljudkanalerna fria, så en flod av dem (en stor explosion) kan inte tysta menyklick.",
"horizon.extras.music_page.tooltip": "Musik och ljud får en Musik...-sida: spela valfritt inbyggt spår nu, eller stäng av ett så att spelet slutar välja det. Ingenting förändras förrän du stänger av ett spår.",
"horizon.extras.mouse_tweaks.tooltip": "Höger-dra placerar en per plats, vänster-dra samlar ihop det hållna objektet, Shift + vänster-dra flyttar varje plats.",
"horizon.extras.mouse_tweaks_wheel.tooltip": "Ner skickar ett objekt i facket till den andra sidan, upp tar tillbaka ett.",
"horizon.extras.sort.tooltip": "Sorterar inventering, kistor, fat, ändkistor och shulkerboxar i kreativ flikordning, slår samman stackar.",
"horizon.extras.sort_key.tooltip": "Sorterar delen under markören. Klicka och tryck sedan på en tangent; Escape frigör det.",
"horizon.extras.no_ai.tooltip": "Döljer och stänger av alla AI-funktioner: agentkontroll, horizon-ctl och MCP-servrarna. Launcherns omkopplare också.",
"horizon.extras.agent_control.tooltip": "Din egen AI-agent kan spela det här spelet via horizon-ctl eller en MCP-klient, endast på den här datorn.",
"horizon.extras.discord_presence.tooltip": "Visar Playing Horizon på din Discord-profil medan Discord körs: menyer, singelspelare eller multiplayer, dimensionen och spelad tid. Aldrig en världsnamn eller en serveradress.",
"Calibrate...": "Kalibrera...",
"Calibrate Anyway...": "Kalibrera ändå...",
"Use Automatic Setup": "Använd automatisk inställning",
"Shortcut: %s": "Genväg: %s",
"Next": "Nästa",
"HDR Calibration %s/%s: %s": "HDR-kalibrering %s/%s: %s",
"Sets the three below full screen, one test picture at a time.": "Ställer in de tre nedanför helskärm, en testbild i taget.",
"A key that opens this screen from the game. Not bound at first.": "En nyckel som öppnar den här skärmen från spelet. Inte bunden till en början.",
"Your display didn't say how bright it gets: calibrate to set it up.": "Din skärm sa inte hur ljus den blir: kalibrera för att ställa in den.",
"Already set up for your display. Only calibrate if HDR looks wrong.": "Redan konfigurerat för din skärm. Kalibrera bara om HDR ser fel ut.",
"Puts Peak Brightness and Paper White back to your display's setup.": "Återställer Peak Brightness och Paper White till skärmens inställningar.",
"Set up for your display. Leave on Auto unless it looks wrong.": "Ställ in för din skärm. Lämna på Auto om det inte ser fel ut.",
"Lower it until the logo just disappears into the black.": "Sänk den tills logotypen precis försvinner i det svarta.",
"Raise it until the logo just disappears into the bright square.": "Höj den tills logotypen precis försvinner i den ljusa fyrkanten.",
"Make the card a white that's comfortable to look at for a long time, in the light you play in.": "Gör kortet vitt som är bekvämt att titta på länge, i ljuset du spelar i.",
"horizon.splitscreen.profiles.forget": "Glöm",
"horizon.splitscreen.profiles.create": "Skapa",
"horizon.splitscreen.profiles.you": " - du",
"horizon.splitscreen.profiles.forget_named": "Glöm %s",
"horizon.splitscreen.profiles.previous": "Föregående",
"horizon.splitscreen.profiles.next": "Nästa",
"horizon.splitscreen.profiles.new_button": "Ny profil...",
"horizon.splitscreen.profiles.forget_title": "Glömt profilen?",
"horizon.splitscreen.profiles.forget_leaves": "Den lämnar denna instanss lista.",
"horizon.splitscreen.profiles.forget_kept": "Världens framsteg och inställningar behålls.",
"horizon.splitscreen.profiles.new_title": "Ny profil",
"horizon.splitscreen.profiles.name_hint": "Namn (3 till 16 bokstäver, siffror, _)",
"horizon.splitscreen.profiles.switch_title": "Byt profil",
"horizon.splitscreen.profiles.offline_note": "Offlineprofiler tillhör denna instans",
"horizon.splitscreen.profiles.move": "Flytta dit du spelar",
"horizon.splitscreen.profiles.move_place": "Flytta dit du spelar: %s",
"horizon.friends.title": "Spela med vänner",
"horizon.friends.hint": "Vänner klistrar in koden efter titelskärmens Vänner-knapp, i direktanslutning eller på startprogrammets spelsida.",
"horizon.friends.copied": "Kopierade",
"horizon.friends.copy_code": "Kopiera kod",
"horizon.friends.stop_sharing": "Sluta dela",
"horizon.friends.none_yet": "Inga vänner här än.",
"horizon.friends.here_now": "Här nu: %s",
"horizon.friends.share_intro": "Dela denna värld bakom en inbjudningskod: den öppnas till LAN och vänner på internet går med med koden. Ingen av vår server är inblandad.",
"horizon.friends.start_sharing": "Börja dela",
"horizon.friends.troubleshooting": "Felsökning...",
"horizon.friends.stopped": "Slutade dela inbjudningskoden.",
"horizon.friends.short_code_changed": "Någon fortsatte att försöka med en felaktig kortkod, så det ändrades.",
"horizon.friends.wrong_code": "Någon försökte med fel kod.",
"horizon.friends.code_ready": "Din inbjudningskod är klar: Spelmeny, Spela med vänner. Kopiera den och skicka den till dina vänner.",
"horizon.friends.share_failed": "Kunde inte dela världen: %s",
"horizon.friends.finding_route": "Hitta hur vänner kan nå dig...",
"horizon.osk.shift": "Skift",
"horizon.osk.space": "Utrymme",
"horizon.osk.delete": "Ta bort",
"horizon.osk.type": "Typ",
"horizon.osk.symbols": "Symboler",
"horizon.osk.close": "Stäng",
"horizon.extras.chat_animation.tooltip": "En ny chattlinje glider in från vänster medan den tonar in, istället för att se hel ut.",
"horizon.extras.chat_indicator.tooltip": "Den färgade stapeln till vänster om en chattlinje.",
"horizon.extras.wheel_cycles_settings.tooltip": "Scrollhjulet över en knapp i inställningarna ändrar dess värde, som i vanilj. Av, hjulet rullar bara i listan.",
"horizon.extras.pack_browser.tooltip": "Select Resource Packs får en Lägg till-knapp som söker efter Modrinth och installerar ett paket i din pack-mapp. Av, spelet kontaktar aldrig Modrinth.",
"horizon.extras.splitscreen.tooltip": "I en värld kan en annan kontroller gå med som en ny spelare: tryck på A när den frågar, välj sedan en profil och var du vill spela.",
"horizon.splitscreen.setup.monitor": "Övervaka %s",
"horizon.splitscreen.setup.monitor_unknown": "en monitor",
"horizon.splitscreen.setup.window": "Fönster %s",
"horizon.splitscreen.setup.new_window": "Nytt fönster",
"horizon.splitscreen.setup.fill_monitor": "Fyll %s",
"horizon.splitscreen.setup.done": "Klart",
"horizon.splitscreen.setup.on": "På",
"horizon.splitscreen.setup.off": "Av",
"horizon.splitscreen.setup.player": "Spelare %s",
"horizon.splitscreen.setup.revert": "Återgå",
"horizon.splitscreen.setup.apply": "Ansök",
"horizon.splitscreen.setup.warning.empty_main": "Ingen spelar i fönster 1: det gömmer sig",
"horizon.splitscreen.setup.warning.empty_close": "Ingen spelar i fönster %s: det stängs vid Apply",
"horizon.splitscreen.setup.warning.empty_new": "Ingen spelar i fönster %s: det öppnas inte",
"horizon.splitscreen.setup.warning.on_main": "Fönster %s fyller fönster 1:s skärm: dess spelare spelar i fönster 1",
"horizon.splitscreen.setup.warning.unplugged": "Fönster %ss bildskärm är inte ansluten: dess spelare spelar i fönster 1",
"horizon.splitscreen.setup.status.off": "Delad skärm är avstängd.",
"horizon.splitscreen.setup.status.enable_hint": "Slå på den och tryck sedan på en knapp på en annan handkontroll i en värld.",
"horizon.splitscreen.setup.status.join_hint": "Tryck på A för att gå med och välja en profil.",
"horizon.splitscreen.setup.status.idle": "Delad skärm inaktiv",
"horizon.splitscreen.setup.status.alone": "Inga andra lokala spelare.",
"horizon.splitscreen.setup.status.solo_controls": "Solokontroller och controller-feedback är oförändrade.",
"horizon.splitscreen.setup.window_empty": "Fönster %s: tomt",
"horizon.splitscreen.setup.note.select": "Klicka på en spelare eller dra den till ett fönster eller en bildskärm.",
"horizon.splitscreen.setup.note.apply": "Ansök om att spela på detta sätt, Återställ för att ångra.",
"horizon.splitscreen.setup.note.place": "Var ska %s spela?",
"horizon.splitscreen.setup.this_player": "denna spelare",
"horizon.splitscreen.setup.switch_disabled": "Delad skärm stängs av när de andra har lämnat (deras pausmeny).",
"horizon.splitscreen.setup.window_place": "Fönster %s (%s av %s)",
"horizon.splitscreen.setup.names": "Namn",
"horizon.splitscreen.setup.identify": "Identifiera",
"horizon.splitscreen.setup.layout.two": "2 delar: %s",
"horizon.splitscreen.setup.layout.three": "3 delar: %s",
"horizon.splitscreen.setup.layout.two.1": "Sida vid sida",
"horizon.splitscreen.setup.layout.two.2": "Topp och botten",
"horizon.splitscreen.setup.layout.three.0": "En bred på toppen",
"horizon.splitscreen.setup.layout.three.1": "En hög till vänster",
"horizon.splitscreen.setup.layout.three.2": "Sida vid sida",
"horizon.splitscreen.setup.help.player": "Klicka eller dra %s för att flytta dem.",
"horizon.splitscreen.setup.help.layout_auto": "%s (sida vid sida när fönstret är brett). Tryck för att ändra.",
"horizon.splitscreen.setup.help.layout": "%s. Tryck för att ändra.",
"horizon.splitscreen.setup.help.switch": "Delad skärm för den här datorn, på eller av.",
"horizon.splitscreen.setup.help.identify": "Varje spelares vy visar vilket fönster de befinner sig i.",
"horizon.splitscreen.setup.help.names": "Varje spelares namn i hörnet av deras vy.",
"horizon.splitscreen.setup.help.revert": "Ångra ändringar som inte har tillämpats ännu.",
"horizon.splitscreen.setup.help.apply": "Spela som kartan visar.",
"horizon.splitscreen.setup.help.unchanged": "Inget förändrats ännu.",
"horizon.splitscreen.setup.give_up_pad": "Ge upp Pad",
"horizon.splitscreen.prompt.controller_connected": "Styrenhet ansluten",
"horizon.splitscreen.prompt.controller_disconnected": "Styrenheten frånkopplad",
"horizon.splitscreen.prompt.controller_disconnected.hint": "Anslut den igen eller tryck på en knapp på en annan",
"horizon.splitscreen.prompt.join.one": "%s vill gå med",
"horizon.splitscreen.prompt.join.many": "%s kontroller vill gå med",
"horizon.splitscreen.prompt.join.yes": "Gå med",
"horizon.splitscreen.prompt.join.as_p1": "Spela som P1",
"horizon.splitscreen.prompt.join.no": "Nej",
"horizon.splitscreen.prompt.lost": "%s: styrenheten frånkopplad",
"horizon.splitscreen.prompt.lost.use_another": "Använd en annan",
"horizon.splitscreen.prompt.lost.leave": "Lämna",
"horizon.splitscreen.setup.help.give_up_pad": "Din handkontroll slutar köra dig och erbjuds att gå med (A).",
"horizon.splitscreen.setup.note.held_at": "%s till %s: A släpper den här, B lägger tillbaka den.",
"horizon.splitscreen.setup.note.held": "%s plockas upp: vänster/höger väljer var, A tappar, B lägger tillbaka den.",
"Hides models behind opaque blocks. Async checks off-thread; entities tick.": "Döljer modeller bakom ogenomskinliga block. Async kontrollerar off-thread; enheter bockar.",
"Block Entities": "Blockera enheter",
"Shulker Boxes": "Shulker lådor",
"Reuses settled boxes; lid movement stays animated.": "Återanvänder utfällda lådor; lockets rörelse förblir animerad.",
"Signs": "Tecken",
"Reuses sign text until text, light, or font changes.": "Återanvänder teckentext tills text, ljus eller teckensnitt ändras.",
"Decorated Pots": "Dekorerade krukor",
"Reuses still pots; break wobble and sherd changes redraw.": "Återanvänder fortfarande krukor; bryta wobble och skärbyten rita om.",
"Bells": "Klockor",
"Reuses still bells; ringing stays animated.": "Återanvänder stilla klockor; ringsignalen förblir animerad.",
"Chests": "kistor",
"Reuses closed chests; moving lids stay animated.": "Återanvänder stängda kistor; rörliga lock förblir animerade.",
"Banners": "Banderoller",
"Reuses poles; flags and pattern layers still update.": "Återanvänder stolpar; flaggor och mönsterlager uppdateras fortfarande.",
"Copper Golem Statues": "Koppar Golem statyer",
"Reuses statue geometry until its block state changes.": "Återanvänder statygeometri tills dess blocktillstånd ändras.",
"Leaf Culling": "Avverkning av löv",
"Every leaf face. Vanilla's fancy leaves.": "Varje löv ansikte. Vaniljs fina blad.",
"Distant Plant Dither": "Avlägsen Plant Dither",
"Keeps fine plants in high-res packs from fading far away.": "Håller fina växter i högupplösta förpackningar från att blekna långt borta.",
"Screenshot Quality": "Skärmbildskvalitet",
"F2 screenshots at this many times the game's resolution. Higher takes longer.": "F2-skärmdumpar med så här många gånger spelets upplösning. Högre tar längre tid.",
"Shows a made-up frame between each two real ones: smoother, a little more lag.": "Visar en påhittad ram mellan vardera två riktiga: mjukare, lite mer fördröjning.",
"Reuses the pack shadow map when sun, view and world match. Off by default.": "Återanvänder packskuggkartan när sol, utsikt och värld matchar. Av som standard.",
"Find BlueMap": "Hitta BlueMap",
"On servers, finds their BlueMap web map for far terrain. Next join.": "På servrar, hittar deras BlueMap webbkarta för långt terräng. Gå med nästa.",
"BlueMap Radius": "BlueMap Radie",
"How far around you BlueMap tiles are downloaded. Next join.": "Hur långt runt dig BlueMap-plattor laddas ner. Gå med nästa.",
"Synchronous": "Synkron",
"Asynchronous": "Asynkron",
"Solid Aggressive": "Solid Aggressiv",
"Hollow": "Ihålig",
"Leaves fully inside a canopy draw solid: fewer see-through layers.": "Bladen helt inuti en kapell drar fast: färre genomskinliga lager.",
"Leaves with one open side draw solid too: faster, chunkier edges.": "Blad med en öppen sida drar också fast: snabbare, tjockare kanter.",
"Drops faces between leaves: faster, but gaps look through.": "Tappar ansikten mellan bladen: snabbare, men luckor ser igenom.",
"Hotbar: Previous Slot": "Hotbar: Tidigare spelautomat",
"Hotbar: Next Slot": "Hotbar: Nästa slot",
"horizon.agent.connected.one": "Ansluten: 1 agentanslutning",
"horizon.agent.connected.many": "Ansluten: %s agentanslutningar",
"horizon.agent.connected.one_ago": "Ansluten: 1 agentanslutning, senaste kommandot för %s s sedan",
"horizon.agent.connected.many_ago": "Ansluten: %s agentanslutningar, senaste kommandot för %s s sedan",
"horizon.agent.waiting": "Väntar på en agent.",
"horizon.agent.off": "Av: agenter kan inte nå det här spelet.",
"horizon.agent.session_opened": "Öppnades för denna session av programmet som startade spelet.",
"horizon.agent.socket": "Socket: %s (kopiera detaljerna för dess fullständiga sökväg)",
"horizon.agent.local_only": "Endast lokalt: agenter på den här datorn, aldrig nätverket.",
"Hides models behind opaque blocks. Entities update. Off with custom packs.": "Döljer modeller bakom ogenomskinliga block. Entitetsuppdatering. Av med anpassade förpackningar.",
"horizon.extras.repro_keys": "Inspelningsgenvägar",
"horizon.extras.repro_keys.tooltip": "F3+R startar eller stoppar en repro-inspelning och F3+E skriver sitt paket. Av som standard: en inspelning kopierar världen.",
"horizon.agent.record_session": "Starta inspelningssession",
"horizon.agent.record_stop": "Stoppa inspelningssession",
"horizon.agent.export_repro": "Exportera Repro-paket",
"horizon.repro.started": "Inspelning startade; F3+R stoppar det och skriver paketet.",
"horizon.repro.stopped": "Inspelning stoppad: %s",
"horizon.repro.bundle": "Repro-paket: %s",
"horizon.repro.no_recording": "Det finns ingen inspelning att exportera än.",
"horizon.repro.replay_started": "Omspelning startade: %s",
"horizon.pack.addInfo": "Lägg till ett resurspaket från Modrinth",
"horizon.pack.addWorking": "Frågar Modrinth...",
"horizon.pack.addNone": "Inga resurspaket hittades",
"horizon.pack.addTitle": "Lägg till ett resurspaket",
"horizon.pack.install": "Installera",
"horizon.pack.installing": "Installerar",
"horizon.pack.installed": "Installerad",
"horizon.pack.search": "Sök",
"horizon.pack.searchHint": "Sök i Modrinth...",
"horizon.pack.filters": "Filter",
"horizon.pack.filter.realistic": "Realistiskt",
"horizon.pack.filter.simplistic": "Förenklat",
"horizon.pack.filter.vanillaLike": "Vaniljliknande",
"horizon.pack.addFailed": "Paketet kunde inte läggas till: %s",
"horizon.extras.header.cosmetics": "Kosmetika",
"horizon.extras.cosmetics_mine": "Min kosmetika",
"horizon.extras.cosmetics_mine.tooltip": "Dolt: alla Horizon-spelare ser dig utan din kosmetika, inklusive du. Samma switch som bärraketens garderob.",
"horizon.extras.cosmetics_others": "Andra spelares kosmetika",
"horizon.extras.cosmetics_others.tooltip": "Vad andra Horizon-spelare bär: allt, bara deras namnetikettstilar eller ingenting. Dolt, spelet frågar aldrig vad de har på sig.",
"horizon.extras.cosmetics_auras": "Andras auror och spår",
"horizon.extras.cosmetics_auras.tooltip": "Auror och spår som andra spelare bär. Av som standard.",
"horizon.extras.cosmetics.shown": "Visas",
"horizon.extras.cosmetics.hidden": "Dold",
"horizon.extras.cosmetics.name_tags": "Endast namnlappar"
}
@@ -0,0 +1,498 @@
{
"horizon.options.controller": "คอนโทรลเลอร์",
"horizon.options.vibration": "การสั่นสะเทือน",
"horizon.options.adaptive_triggers": "ทริกเกอร์แบบปรับตัว",
"horizon.options.lightbar": "แถบไฟ",
"horizon.options.look_sensitivity": "ความไวในการมอง",
"horizon.options.invert_x": "กลับแกน X การมอง",
"horizon.options.invert_y": "กลับแกน Y การมอง",
"horizon.options.sneak_button": "ปุ่มย่อง",
"horizon.options.move_deadzone": "เดดโซนการเคลื่อนที่",
"horizon.options.look_deadzone": "เดดโซนการมอง",
"horizon.options.button_glyphs": "ปุ่มสัญลักษณ์",
"horizon.options.menu_navigation": "การนำทางเมนู",
"horizon.options.on_screen_keyboard": "แป้นพิมพ์บนหน้าจอ",
"horizon.options.chat_delay": "แชทล่าช้า",
"horizon.options.lightbar.health": "สุขภาพ",
"horizon.options.lightbar.dimension": "มิติข้อมูล",
"horizon.options.glyphs.auto": "อัตโนมัติ",
"horizon.options.glyphs.xbox": "เอกซ์บอกซ์",
"horizon.options.glyphs.playstation": "เพลย์สเตชัน",
"horizon.options.glyphs.nintendo": "นินเทนโด",
"horizon.options.menu_focus": "โฟกัส",
"horizon.options.menu_pointer": "ตัวชี้",
"horizon.options.keyboard.auto": "อัตโนมัติ",
"horizon.options.keyboard.steam": "ไอน้ำ",
"horizon.options.unavailable": "ฟีเจอร์นี้ยังไม่มีให้บริการใน Horizon",
"horizon.options.search": "การตั้งค่าการค้นหา...",
"horizon.pages.mods": "ม็อด",
"horizon.pages.shader_packs": "เชเดอร์แพ็ก",
"horizon.pages.shader_options": "ตัวเลือกเชเดอร์",
"horizon.pages.controller": "การตั้งค่าคอนโทรลเลอร์",
"horizon.pages.controller_binds": "ตัวควบคุมผูก",
"horizon.pages.extras": "ส่วนเสริม Horizon",
"horizon.pages.settings": "การตั้งค่า Horizon",
"horizon.pages.agent": "ตัวแทนเอไอ",
"horizon.split.leave": "ลาออก",
"horizon.pages.split_settings": "การตั้งค่าการแบ่งหน้าจอ",
"horizon.pages.split_profiles": "ใครกำลังเล่นอยู่?",
"horizon.pages.split_setup": "การตั้งค่าแยกหน้าจอ",
"horizon.pages.music": "ดนตรี",
"horizon.pages.music.menu": "เมนู",
"horizon.pages.music.overworld": "โอเวอร์เวิลด์",
"horizon.pages.music.creative": "สร้างสรรค์",
"horizon.pages.music.underwater": "ใต้น้ำ",
"horizon.pages.music.end": "จุดจบ",
"horizon.pages.music.boss": "บอส",
"horizon.pages.music.credits": "เครดิต",
"horizon.pages.music.overworld_biomes": "สิ่งมีชีวิตเหนือโลก",
"horizon.pages.music.nether_biomes": "นิเวศน์วิทยา",
"horizon.pages.music.end_biomes": "สิ้นสุดชีวนิเวศ",
"horizon.pages.music.other": "เพลงอื่นๆ",
"horizon.pages.music.empty": "ไม่มีแทร็กเพลง: เสียงของเกมไม่ได้โหลด",
"horizon.pages.music.tooltip": "แทร็กในตัวตามสถานการณ์: เล่นตอนนี้หรือปิดแทร็กใด ๆ เพื่อที่เกมจะหยุดเลือก",
"horizon.pages.settings.tooltip": "การตั้งค่าของ Horizon: กราฟิก คอนโทรลเลอร์ ส่วนเสริม และม็อด",
"horizon.pages.graphics.tooltip": "กราฟิกง่ายๆ: แต่ละการตั้งค่าบอกว่ามีค่าใช้จ่ายเท่าไร",
"horizon.pages.graphics_advanced.tooltip": "การตั้งค่ากราฟิกทุกรายการ รวมไปถึง Horizon แล้ว ราคาแต่ละอย่าง",
"horizon.pages.controller.tooltip": "ตัวควบคุม: ปุ่ม แท่ง การสั่น และการนำทางเมนู",
"horizon.pages.extras.tooltip": "ตัวเลือกเพิ่มเติม ปิดทั้งหมดตามค่าเริ่มต้น: เกมจะคงอยู่จนกว่าคุณจะเปิด",
"horizon.pages.agent.tooltip": "ให้ตัวแทน AI ของคุณเล่น: ไคลเอนต์ Horizon-ctl และ MCP บนคอมพิวเตอร์เครื่องนี้",
"horizon.pages.split_profiles.tooltip": "ใครเล่น: โปรไฟล์ที่เก็บไว้ในโฟลเดอร์เกมนี้",
"horizon.pages.split_setup.tooltip": "หน้าต่างและจอภาพและใครเล่นที่ไหน",
"horizon.pages.shader_packs.tooltip": "ชุด Shader จากโฟลเดอร์ shaderpacks: ของ Horizon และที่อยู่ในรูปแบบ shaders/ หนึ่งวิ่งในแต่ละครั้ง",
"horizon.pages.mods.tooltip": "Mods ที่สร้างขึ้นสำหรับ Horizon จากโฟลเดอร์ Horizon-Mods แต่ละอันทำงานในแซนด์บ็อกซ์และปิดอยู่จนกว่าคุณจะเปิดใช้งาน",
"horizon.pages.open.graphics": "กราฟิก...",
"horizon.pages.open.graphics_advanced": "กราฟิกขั้นสูง...",
"horizon.pages.open.shader_packs": "เชเดอร์แพ็ค...",
"horizon.pages.open.controller": "การตั้งค่าตัวควบคุม...",
"horizon.pages.open.split_setup": "แยกหน้าจอ...",
"horizon.pages.open.extras": "อุปกรณ์เสริม...",
"horizon.pages.open.mods": "ม็อด...",
"horizon.pages.open.agent": "ตัวแทนเอไอ...",
"horizon.pages.open.horizon_graphics": "กราฟิก Horizon...",
"horizon.pages.open.controller_binds": "คอนโทรลเลอร์ผูก...",
"horizon.pages.open.horizon_settings": "การตั้งค่า Horizon...",
"horizon.pages.open.music": "ดนตรี...",
"horizon.mods.empty": "ไม่มี mods: ใส่ไฟล์ .hmod ลงในโฟลเดอร์ Horizon-mods",
"horizon.mods.stopped": " (หยุดแล้ว)",
"horizon.mods.not_built": " (ไม่ได้สร้าง)",
"horizon.mods.dev": " (เดฟ)",
"horizon.mods.settings": "การตั้งค่า",
"horizon.mods.in_world": " (ปล่อยให้โลกเปลี่ยนแปลง)",
"horizon.mods.open_folder": "เปิดโฟลเดอร์ Mod",
"horizon.shader_packs.empty": "ไม่มีแพ็คเชเดอร์: ใส่ไว้ในโฟลเดอร์เชเดอร์แพ็ก",
"horizon.shader_options.open": "ตัวเลือกเชเดอร์...",
"horizon.shader_options.profile": "โปรไฟล์",
"horizon.shader_options.loading": "กำลังอ่านตัวเลือกของแพ็คเชเดอร์...",
"horizon.agent.copy_details": "คัดลอกรายละเอียดการเชื่อมต่อ",
"horizon.multiplayer.join": "เข้าร่วม",
"horizon.multiplayer.cancel_reconnecting": "ยกเลิกการเชื่อมต่อใหม่",
"horizon.multiplayer.join_friend": "เข้าร่วมเป็นเพื่อน",
"horizon.multiplayer.invite_code": "รหัสเชิญ",
"horizon.multiplayer.relay": "รีเลย์ (อุปกรณ์เสริม)",
"Preset": "ที่ตั้งไว้ล่วงหน้า",
"LOD Distance": "ระยะทางลอด",
"Far Detail": "รายละเอียดไกล",
"Cave Culling": "การคัดแยกถ้ำ",
"Entity Culling": "การคัดแยกเอนทิตี",
"Chunk Updates": "การอัปเดตก้อน",
"Upload Budget": "อัปโหลดงบประมาณ",
"Sky": "ท้องฟ้า",
"Fog": "หมอก",
"Weather": "สภาพอากาศ",
"Animated Textures": "พื้นผิวเคลื่อนไหว",
"Present Mode": "โหมดปัจจุบัน",
"Frame Pacing": "การเว้นจังหวะของเฟรม",
"Worker Threads": "กระทู้คนงาน",
"Resolution Scale": "ระดับความละเอียด",
"Anti-aliasing": "ต่อต้านนามแฝง",
"Upscaling": "การขยายขนาด",
"Paper White": "กระดาษขาว",
"Peak Brightness": "ความสว่างสูงสุด",
"Black Level": "ระดับสีดำ",
"UI Brightness": "ความสว่าง UI",
"Battery Mode": "โหมดแบตเตอรี่",
"Graphics API": "กราฟิกเอพีไอ",
"Translucent Batching": "การผสมแบบโปร่งแสง",
"Performance Overlay": "การซ้อนทับประสิทธิภาพ",
"Full Detail Distance": "ระยะทางรายละเอียดเต็ม",
"On": "เปิด",
"Off": "ปิด",
"Unlimited": "ไม่จำกัด",
"Auto": "อัตโนมัติ",
"Custom": "กำหนดเอง",
"Performance": "ประสิทธิภาพ",
"Balanced": "สมดุล",
"Quality": "คุณภาพ",
"Ultra": "อัลตร้า",
"Ultra Performance": "ประสิทธิภาพขั้นสูงสุด",
"Native": "พื้นเมือง",
"Full": "เต็ม",
"Reduced": "ลดลง",
"Efficient": "มีประสิทธิภาพ",
"Precise": "แม่นยำ",
"Auto (VSync)": "อัตโนมัติ (VSync)",
"Mailbox": "ตู้ไปรษณีย์",
"Immediate": "ทันที",
"Vulkan": "วัลแคน",
"DirectX 12": "ไดเร็คเอ็กซ์ 12",
"FPS and Graph": "FPS และกราฟ",
"FPS": "เฟรมต่อวินาที",
"TAA": "สทท",
"No cost": "ไม่มีค่าใช้จ่าย",
"Low cost": "ต้นทุนต่ำ",
"Medium cost": "ต้นทุนปานกลาง",
"High cost": "ค่าใช้จ่ายสูง",
"Saves time": "ประหยัดเวลา",
"HDR": "เอชดีอาร์",
"Graphics": "กราฟิก",
"Done": "เสร็จแล้ว",
"This feature is not yet available in Horizon.": "ฟีเจอร์นี้ยังไม่มีให้บริการใน Horizon",
"Your display or system doesn't offer HDR output.": "จอแสดงผลหรือระบบของคุณไม่มีเอาต์พุต HDR",
"Turn HDR on to use it.": "เปิด HDR เพื่อใช้งาน",
"Your GPU or graphics API doesn't support it.": "GPU หรือกราฟิก API ของคุณไม่รองรับ",
"%s chunks": "%s ชิ้น",
"%s per frame": "%s ต่อเฟรม",
"%s MiB/frame": "%s MiB/เฟรม",
"%s KiB/frame": "%s KiB/เฟรม",
"Auto (%s)": "อัตโนมัติ (%s)",
"Full-detail terrain range. LOD Distance can extend local worlds farther.": "ช่วงภูมิประเทศที่มีรายละเอียดครบถ้วน ระยะทาง LOD สามารถขยายโลกในท้องถิ่นให้ไกลออกไป",
"Coarse distant terrain in local worlds. Integrated GPUs stop at 128 chunks.": "ภูมิประเทศอันห่างไกลที่หยาบในโลกท้องถิ่น GPU ในตัวหยุดที่ 128 ชิ้น",
"Reduced draws far terrain coarser: faster on this integrated GPU.": "ลดการดึงภูมิประเทศระยะไกลที่หยาบยิ่งขึ้น: เร็วขึ้นบน GPU ในตัวนี้",
"Reduced draws far terrain coarser, for GPUs it slows down.": "ลดการดึงภูมิประเทศที่ไกลออกไปให้หยาบขึ้น สำหรับ GPU มันจะช้าลง",
"Field of view. Wider shows more terrain at once.": "สาขาการมองเห็น กว้างขึ้นแสดงภูมิประเทศได้มากขึ้นในคราวเดียว",
"Caps frames per second; a cap saves power and heat.": "แคปเฟรมต่อวินาที ฝาปิดช่วยประหยัดพลังงานและความร้อน",
"Waits for the display's refresh: no tearing, a little latency.": "รอการรีเฟรชหน้าจอ: ไม่มีรอยขาด, เวลาแฝงเล็กน้อย",
"Size of menus and the HUD.": "ขนาดของเมนูและ HUD",
"Sets the options below together. Changing one makes it Custom.": "ตั้งค่าตัวเลือกด้านล่างพร้อมกัน การเปลี่ยนอันหนึ่งทำให้เป็นแบบกำหนดเอง",
"Lava, fire and sunlight shine brighter than white. Needs an HDR display.": "ลาวา ไฟ และแสงแดดส่องสว่างยิ่งกว่าสีขาว จำเป็นต้องมีจอแสดงผล HDR",
"Your display's darkest black. 0 for OLED; LCDs glow a little.": "จอแสดงผลของคุณมีสีดำเข้มที่สุด 0 สำหรับ OLED; LCD เรืองแสงเล็กน้อย",
"How bright highlights get. Auto: the peak your system reports.": "ไฮไลท์จะสว่างขนาดไหน อัตโนมัติ: จุดสูงสุดที่ระบบของคุณรายงาน",
"How bright white paper and menus look. Auto: your desktop's white.": "กระดาษขาวและเมนูดูสว่างแค่ไหน อัตโนมัติ: เดสก์ท็อปของคุณเป็นสีขาว",
"How bright the HUD and menus are, against paper white.": "HUD และเมนูมีความสว่างเพียงใด เมื่อเทียบกับกระดาษสีขาว",
"How far mobs, crops and machines keep working. CPU time.": "ฝูงชน พืชผล และเครื่องจักรยังคงทำงานต่อไปได้ไกลแค่ไหน เวลาซีพียู",
"How far away mobs and items are drawn, as a share of normal.": "จะมีการดึง mobs และไอเท็มออกไปไกลแค่ไหนซึ่งเป็นเรื่องปกติ",
"Skips terrain hidden behind closed sections. Off costs a lot.": "ข้ามภูมิประเทศที่ซ่อนอยู่หลังส่วนที่ปิด ออกค่าใช้จ่ายเยอะมาก",
"Hides entities behind opaque blocks.": "ซ่อนเอนทิตีไว้หลังบล็อกทึบแสง",
"No entity occlusion culling.": "ไม่มีการคัดแยกเอนทิตี",
"CPU occlusion test runs this frame.": "การทดสอบการบดเคี้ยวของ CPU รันเฟรมนี้",
"Occlusion checks run on a worker thread.": "การตรวจสอบการบดเคี้ยวรันบนเธรดของผู้ปฏิบัติงาน",
"Meshed sections uploaded per frame. Lower is smoother while loading.": "ส่วนที่ซ้อนกันที่อัปโหลดต่อเฟรม ช่วงล่างนุ่มนวลกว่าขณะโหลด",
"Soft shadows in corners. Costs chunk building time only.": "มีเงาอ่อนๆ ตามมุม ต้นทุนเวลาสร้างก้อนเท่านั้น",
"Smaller copies of block textures for distant terrain: less shimmer.": "พื้นผิวบล็อกที่มีขนาดเล็กลงสำหรับภูมิประเทศระยะไกล: มีแสงแวววาวน้อยลง",
"Blends grass and water colours across biomes when building chunks.": "ผสมหญ้าและสีน้ำทั่วทั้งชีวนิเวศเมื่อสร้างชิ้นส่วน",
"Cloud layer: off, flat (fast) or 3D (fancy).": "เลเยอร์คลาวด์: ปิด, แบน (เร็ว) หรือ 3D (แฟนซี)",
"How far clouds reach, in chunks.": "เมฆไปไกลแค่ไหนเป็นชิ้น ๆ",
"Draws the sky, sun, moon and stars.": "วาดภาพท้องฟ้า พระอาทิตย์ พระจันทร์ และดวงดาว",
"Distance fog. Off shows the edge of the loaded world.": "หมอกห่าง. ปิดแสดงขอบของโลกที่โหลด",
"Draws rain and snow.": "ดึงดูดฝนและหิมะ",
"How far rain and snow fall around you.": "ฝนและหิมะตกรอบตัวคุณไกลแค่ไหน",
"How many particles effects spawn.": "จำนวนอนุภาคที่ส่งผลต่อการวางไข่",
"Round shadows under mobs and items.": "เงากลมๆ ใต้ม็อบและไอเท็ม",
"Leaves with see-through gaps. Off draws them solid.": "ใบไม้มีช่องว่างที่มองเห็นได้ ปิดดึงพวกเขาแข็ง",
"Sorts water and glass more exactly behind each other.": "จัดเรียงน้ำและแก้วตามหลังกันมากขึ้น",
"Which chunk rebuilds wait for the frame: none, nearby or yours.": "ส่วนไหนที่สร้างใหม่รอเฟรมอยู่: ไม่มีเลย ใกล้เคียงหรือของคุณ",
"Animates water, lava, fire and other moving textures.": "ทำให้น้ำ ลาวา ไฟ และพื้นผิวเคลื่อนไหวอื่นๆ เคลื่อนไหวได้",
"World pixels per screen pixel. Below 100% is faster on the GPU.": "พิกเซลโลกต่อพิกเซลหน้าจอ ต่ำกว่า 100% จะเร็วกว่าบน GPU",
"Smooths jagged edges. FXAA: softer. TAA: smoothest, moving things may trail.": "ปรับขอบหยักให้เรียบ FXAA: นุ่มนวลกว่า TAA: สิ่งของที่เคลื่อนไหวและราบรื่นที่สุดอาจเคลื่อนตัวได้",
"Renders the world smaller and rebuilds it with TAA. Faster, softer.": "ทำให้โลกเล็กลงและสร้างใหม่ด้วย TAA เร็วขึ้นนุ่มนวลขึ้น",
"HDR output on an HDR display: lava, fire and sunlight shine brighter.": "เอาต์พุต HDR บนจอแสดงผล HDR: ลาวา ไฟ และแสงแดดส่องสว่างยิ่งขึ้น",
"How frames reach the screen while VSync is off.": "วิธีที่เฟรมเข้าถึงหน้าจอในขณะที่ VSync ปิดอยู่",
"Efficient sleeps until the next frame; Precise spins, like vanilla.": "นอนหลับได้อย่างมีประสิทธิภาพจนถึงเฟรมถัดไป การหมุนที่แม่นยำราวกับวานิลลา",
"Fills the screen (borderless).": "เติมเต็มหน้าจอ (ไร้ขอบ)",
"Brightens dark places.": "ทำให้บริเวณที่มืดสว่างขึ้น",
"Lowers the frame rate when minimised, or idle too.": "ลดอัตราเฟรมเมื่อย่อเล็กสุดหรือไม่ได้ใช้งานด้วย",
"Sways the view while walking.": "ชมวิวระหว่างเดิน",
"Fades newly loaded chunks in.": "จางหายไปชิ้นที่เพิ่งโหลดเข้ามา",
"Darkens the screen's edges.": "ทำให้ขอบหน้าจอมืดลง",
"Shows when the world saves.": "แสดงเมื่อโลกกอบกู้",
"Shows attack cooldown.": "แสดงคูลดาวน์การโจมตี",
"60 FPS cap (30 in menus or unfocused), half the workers: less power.": "สูงสุด 60 FPS (30 ในเมนูหรือไม่ได้โฟกัส) คนงานครึ่งหนึ่ง: พลังงานน้อยลง",
"Threads that generate, light and mesh chunks. Next start.": "ด้ายที่สร้างแสงและเป็นชิ้นตาข่าย เริ่มต่อไป.",
"Vulkan, then DirectX 12 (Windows) or OpenGL (Linux) where it fails. Next start.": "Vulkan ตามด้วย DirectX 12 (Windows) หรือ OpenGL (Linux) ในกรณีที่ใช้งานไม่ได้ เริ่มต่อไป.",
"Water and glass in one buffer: fewer draw calls, a bit more VRAM. Next start.": "น้ำและแก้วในบัฟเฟอร์เดียว: การโทรน้อยลง, VRAM เพิ่มขึ้นเล็กน้อย เริ่มต่อไป.",
"Mesh data sent to the GPU per frame. Lower is smoother while loading.": "ข้อมูล Mesh ถูกส่งไปยัง GPU ต่อเฟรม ช่วงล่างนุ่มนวลกว่าขณะโหลด",
"Frame rate and frame times over the game, with a graph.": "อัตราเฟรมและเฟรมไทม์ตลอดทั้งเกม พร้อมกราฟ",
"horizon.multiplayer.finding_friend": "ค้นหาโลกของเพื่อนของคุณ...",
"horizon.multiplayer.not_signed_in": "เซิร์ฟเวอร์นี้อยู่ในโหมดออนไลน์ ลงชื่อเข้าใช้ด้วยบัญชี Microsoft ของคุณใน Horizon Launcher เพื่อเข้าร่วม",
"horizon.multiplayer.invalid_address": "ที่อยู่เซิร์ฟเวอร์ไม่ถูกต้อง: %s",
"horizon.multiplayer.connected_friend_direct": "เชื่อมต่อโดยตรงกับเพื่อนของคุณ...",
"horizon.multiplayer.connected_friend_relay": "เชื่อมต่อกับเพื่อนของคุณผ่านรีเลย์...",
"General": "ทั่วไป",
"Advanced": "ขั้นสูง",
"Undo": "เลิกทำ",
"Search options": "ตัวเลือกการค้นหา",
"Shortcut": "ทางลัด",
"Distance": "ระยะทาง",
"Display": "จอแสดงผล",
"Interface": "อินเทอร์เฟซ",
"Sky and weather": "ท้องฟ้าและสภาพอากาศ",
"Lighting and entities": "แสงสว่างและเอนทิตี",
"Textures": "พื้นผิว",
"Image": "รูปภาพ",
"Chunk loading": "กำลังโหลดก้อน",
"Culling": "การคัดแยก",
"Power": "พลัง",
"Frames": "เฟรม",
"Overlay": "โอเวอร์เลย์",
"Output": "เอาท์พุต",
"Brightness": "ความสว่าง",
"How far you see, the window and the HUD.": "คุณมองเห็นหน้าต่างและ HUD ไกลแค่ไหน",
"The sky and weather, lighting, textures and the image.": "ท้องฟ้าและสภาพอากาศ แสง พื้นผิว และภาพ",
"Chunk loading, culling and power use.": "การโหลดก้อน การคัดแยก และการใช้พลังงาน",
"How frames reach the screen, and the performance overlay.": "วิธีที่เฟรมเข้าถึงหน้าจอ และการแสดงภาพซ้อนทับ",
"Brighter-than-white output on an HDR display.": "เอาต์พุตที่สว่างกว่าสีขาวบนจอแสดงผล HDR",
"Results for \"%s\"": "ผลลัพธ์สำหรับ \"%s\"",
"No settings match.": "ไม่มีการตั้งค่าที่ตรงกัน",
"horizon.title.not_affiliated": "ไม่มีส่วนเกี่ยวข้องกับ Mojang หรือ Microsoft",
"horizon.extras.header.lighting": "แสงสว่าง",
"horizon.extras.header.third_person": "บุคคลที่สาม",
"horizon.extras.header.particles": "อนุภาค",
"horizon.extras.header.inventory": "สินค้าคงคลัง",
"horizon.extras.header.chat": "แชท",
"horizon.extras.header.multiplayer": "ผู้เล่นหลายคน",
"horizon.extras.header.sound": "เสียง",
"horizon.extras.header.menus": "เมนู",
"horizon.extras.fullbright": "ฟูลไบรท์",
"horizon.extras.dynamic_lights": "ไฟแบบไดนามิก",
"horizon.extras.own_name_tag": "ป้ายชื่อของตัวเอง",
"horizon.extras.hide_block_particles": "ซ่อนอนุภาคตัวแบ่งบล็อก",
"horizon.extras.auto_reconnect": "เชื่อมต่อใหม่อัตโนมัติ",
"horizon.extras.ui_sound_reserve": "เก็บช่องสำหรับเสียง UI",
"horizon.extras.music_page": "หน้าเพลง",
"horizon.extras.mouse_tweaks": "การควบคุมการปรับแต่งเมาส์",
"horizon.extras.mouse_tweaks_wheel": "ล้อเลื่อนจะย้ายรายการต่างๆ",
"horizon.extras.sort": "ปุ่มเรียงลำดับ",
"horizon.extras.sort_key": "คีย์การเรียงลำดับ",
"horizon.extras.no_ai": "ไม่มีเอไอ",
"horizon.extras.agent_control": "การควบคุมตัวแทน",
"horizon.extras.discord_presence": "ไม่ลงรอยกัน Rich Presence",
"horizon.extras.splitscreen": "แยกหน้าจอ",
"horizon.extras.chat_animation": "แชทได้อย่างราบรื่น",
"horizon.extras.chat_indicator": "ตัวบ่งชี้ข้อความ",
"horizon.extras.wheel_cycles_settings": "ล้อเลื่อนเปลี่ยนการตั้งค่า",
"horizon.extras.pack_browser": "เบราว์เซอร์แพ็คทรัพยากร",
"horizon.extras.fullbright.tooltip": "แสดงบล็อกและเอนทิตีด้วยแสงเต็มที่ แม้ในที่มืด",
"horizon.extras.dynamic_lights.tooltip": "คบเพลิงและแหล่งกำเนิดแสงอื่นๆ ถือ ทิ้ง หรือจุดไฟให้บล็อกที่อยู่รอบตัวพวกเขา",
"horizon.extras.own_name_tag.tooltip": "แสดงชื่อของคุณเหนือหัวของคุณในบุคคลที่สามตามที่ผู้เล่นคนอื่นเห็น ซ่อนเมื่อเซิร์ฟเวอร์ซ่อนชื่อทีมของคุณหรือคุณมองไม่เห็น",
"horizon.extras.hide_block_particles.tooltip": "ซ่อนอนุภาคเศษซากที่แตกออกจากบล็อกที่แตกหักและแตกออกจากบล็อกที่คุณขุด อนุภาคอื่นๆ ยังคงอยู่",
"horizon.extras.auto_reconnect.tooltip": "เข้าร่วมเซิร์ฟเวอร์อีกครั้งหลังจากการเชื่อมต่อขาดหายไปหรือการรีสตาร์ท ไม่เคยหลังจากการเตะหรือแบน",
"horizon.extras.ui_sound_reserve.tooltip": "เสียงในโลกนี้ปล่อยให้ช่องเสียง 16 ช่องจาก 247 ช่องฟรี ดังนั้นช่องเสียงที่มีอยู่มากมาย (การระเบิดครั้งใหญ่) จึงไม่สามารถปิดเสียงการคลิกเมนูได้",
"horizon.extras.music_page.tooltip": "Music & Sounds รับหน้าเพลง...: เล่นแทร็กในตัวทันที หรือปิดหนึ่งแทร็กเพื่อให้เกมหยุดเลือกเพลง ไม่มีอะไรเปลี่ยนแปลงจนกว่าคุณจะปิดแทร็ก",
"horizon.extras.mouse_tweaks.tooltip": "ลากขวาวางหนึ่งรายการต่อช่อง การลากซ้ายรวบรวมรายการที่ค้างไว้ Shift + ลากซ้ายจะย้ายทุกช่อง",
"horizon.extras.mouse_tweaks_wheel.tooltip": "ลงส่งรายการหนึ่งของช่องไปอีกด้านหนึ่ง ขึ้นนำรายการหนึ่งกลับมา",
"horizon.extras.sort.tooltip": "จัดเรียงสินค้าคงคลัง หีบ บาร์เรล หีบเอนเดอร์ และกล่อง shulker ตามลำดับแท็บสร้างสรรค์ การรวมสแต็ค",
"horizon.extras.sort_key.tooltip": "จัดเรียงส่วนที่อยู่ใต้เคอร์เซอร์ คลิก จากนั้นกดปุ่ม หลบหนีปลดมันออก",
"horizon.extras.no_ai.tooltip": "ซ่อนและปิดฟีเจอร์ AI ทั้งหมด: การควบคุมตัวแทน, Horizon-ctl และเซิร์ฟเวอร์ MCP สวิตช์ของตัวเรียกใช้งานด้วย",
"horizon.extras.agent_control.tooltip": "เจ้าหน้าที่ AI ของคุณสามารถเล่นเกมนี้ได้ผ่าน Horizon-ctl หรือไคลเอนต์ MCP บนคอมพิวเตอร์เครื่องนี้เท่านั้น",
"horizon.extras.discord_presence.tooltip": "แสดง Playing Horizon บนโปรไฟล์ Discord ของคุณในขณะที่ Discord ทำงาน: เมนู ผู้เล่นเดี่ยวหรือผู้เล่นหลายคน มิติข้อมูลและเวลาที่เล่น ไม่เคยเป็นชื่อของโลกหรือที่อยู่ของเซิร์ฟเวอร์",
"Calibrate...": "ปรับเทียบ...",
"Calibrate Anyway...": "ปรับเทียบต่อไป...",
"Use Automatic Setup": "ใช้การตั้งค่าอัตโนมัติ",
"Shortcut: %s": "ทางลัด: %s",
"Next": "ถัดไป",
"HDR Calibration %s/%s: %s": "การปรับเทียบ HDR %s/%s: %s",
"Sets the three below full screen, one test picture at a time.": "ตั้งค่าสามภาพด้านล่างแบบเต็มหน้าจอ ครั้งละหนึ่งภาพทดสอบ",
"A key that opens this screen from the game. Not bound at first.": "กุญแจที่ใช้เปิดหน้าจอนี้จากเกม ตอนแรกไม่ได้ผูกมัด..",
"Your display didn't say how bright it gets: calibrate to set it up.": "จอแสดงผลของคุณไม่ได้บอกว่าสว่างแค่ไหน: ปรับเทียบเพื่อตั้งค่า",
"Already set up for your display. Only calibrate if HDR looks wrong.": "ตั้งค่าการแสดงผลของคุณเรียบร้อยแล้ว ปรับเทียบเฉพาะในกรณีที่ HDR ดูผิดปกติ",
"Puts Peak Brightness and Paper White back to your display's setup.": "ปรับความสว่างสูงสุดและสีขาวกระดาษกลับไปที่การตั้งค่าจอแสดงผลของคุณ",
"Set up for your display. Leave on Auto unless it looks wrong.": "ตั้งค่าสำหรับจอแสดงผลของคุณ ปล่อยให้เป็นอัตโนมัติเว้นแต่จะดูผิด",
"Lower it until the logo just disappears into the black.": "ลดระดับลงจนกระทั่งโลโก้หายไปจนกลายเป็นสีดำ",
"Raise it until the logo just disappears into the bright square.": "ยกขึ้นจนกระทั่งโลโก้หายไปในสี่เหลี่ยมจัตุรัสสว่างๆ",
"Make the card a white that's comfortable to look at for a long time, in the light you play in.": "ทำให้การ์ดเป็นสีขาวที่มองได้สบายตาเป็นเวลานานในแสงที่คุณเล่น",
"horizon.splitscreen.profiles.forget": "ลืม",
"horizon.splitscreen.profiles.create": "สร้าง",
"horizon.splitscreen.profiles.you": " - คุณ",
"horizon.splitscreen.profiles.forget_named": "ลืม %s",
"horizon.splitscreen.profiles.previous": "ก่อนหน้า",
"horizon.splitscreen.profiles.next": "ถัดไป",
"horizon.splitscreen.profiles.new_button": "โปรไฟล์ใหม่...",
"horizon.splitscreen.profiles.forget_title": "ลืมโปรไฟล์ใช่ไหม?",
"horizon.splitscreen.profiles.forget_leaves": "มันจะออกจากรายการของอินสแตนซ์นี้",
"horizon.splitscreen.profiles.forget_kept": "ความก้าวหน้าและการตั้งค่าของโลกจะถูกเก็บไว้",
"horizon.splitscreen.profiles.new_title": "โปรไฟล์ใหม่",
"horizon.splitscreen.profiles.name_hint": "ชื่อ (ตัวอักษร 3 ถึง 16 ตัว, ตัวเลข, _)",
"horizon.splitscreen.profiles.switch_title": "สลับโปรไฟล์",
"horizon.splitscreen.profiles.offline_note": "โปรไฟล์ออฟไลน์เป็นของอินสแตนซ์นี้",
"horizon.splitscreen.profiles.move": "ย้ายตำแหน่งที่คุณเล่น",
"horizon.splitscreen.profiles.move_place": "ย้ายไปที่ที่คุณเล่น: %s",
"horizon.friends.title": "เล่นกับเพื่อน",
"horizon.friends.hint": "เพื่อนวางโค้ดไว้หลังปุ่มเพื่อนของหน้าจอชื่อเรื่อง ในการเชื่อมต่อโดยตรง หรือบนหน้าเล่นของตัวเรียกใช้งาน",
"horizon.friends.copied": "คัดลอกแล้ว",
"horizon.friends.copy_code": "คัดลอกรหัส",
"horizon.friends.stop_sharing": "หยุดการแบ่งปัน",
"horizon.friends.none_yet": "ยังไม่มีเพื่อนที่นี่",
"horizon.friends.here_now": "ที่นี่ตอนนี้: %s",
"horizon.friends.share_intro": "แบ่งปันโลกนี้ด้วยรหัสเชิญ: เปิดเป็น LAN และเพื่อนบนอินเทอร์เน็ตเข้าร่วมด้วยรหัส ไม่มีเซิร์ฟเวอร์ของเราเกี่ยวข้อง",
"horizon.friends.start_sharing": "เริ่มแบ่งปัน",
"horizon.friends.troubleshooting": "กำลังแก้ไขปัญหา...",
"horizon.friends.stopped": "หยุดแชร์รหัสเชิญแล้ว",
"horizon.friends.short_code_changed": "มีคนพยายามใช้รหัสสั้นผิด ดังนั้นมันจึงเปลี่ยนไป",
"horizon.friends.wrong_code": "มีคนลองใช้รหัสผิด",
"horizon.friends.code_ready": "รหัสเชิญของคุณพร้อมแล้ว: เมนูเกม เล่นกับเพื่อน ๆ คัดลอกและส่งให้เพื่อนของคุณ",
"horizon.friends.share_failed": "ไม่สามารถแบ่งปันโลกได้: %s",
"horizon.friends.finding_route": "กำลังค้นหาวิธีที่เพื่อนๆ สามารถติดต่อคุณได้...",
"horizon.osk.shift": "กะ",
"horizon.osk.space": "อวกาศ",
"horizon.osk.delete": "ลบ",
"horizon.osk.type": "ประเภท",
"horizon.osk.symbols": "สัญลักษณ์",
"horizon.osk.close": "ปิด",
"horizon.extras.chat_animation.tooltip": "บรรทัดแชทใหม่เลื่อนเข้ามาจากด้านซ้ายในขณะที่ค่อยๆ จางหายไป แทนที่จะปรากฏทั้งหมด",
"horizon.extras.chat_indicator.tooltip": "แถบสีทางด้านซ้ายของแชท",
"horizon.extras.wheel_cycles_settings.tooltip": "ล้อเลื่อนเหนือปุ่มในการตั้งค่าจะเปลี่ยนค่าเช่นเดียวกับในวานิลลา ปิด วงล้อจะเลื่อนเฉพาะรายการเท่านั้น",
"horizon.extras.pack_browser.tooltip": "เลือก Resource Packs จะได้รับปุ่มเพิ่มที่ค้นหา Modrinth และติดตั้งแพ็คลงในโฟลเดอร์แพ็คของคุณ ปิด เกมไม่เคยติดต่อกับ Modrinth",
"horizon.extras.splitscreen.tooltip": "ในโลกหนึ่ง คอนโทรลเลอร์อื่นสามารถเข้าร่วมเป็นผู้เล่นใหม่ได้ โดยกด A เมื่อระบบถาม จากนั้นเลือกโปรไฟล์และสถานที่ที่จะเล่น",
"horizon.splitscreen.setup.monitor": "มอนิเตอร์ %s",
"horizon.splitscreen.setup.monitor_unknown": "จอภาพ",
"horizon.splitscreen.setup.window": "หน้าต่าง %s",
"horizon.splitscreen.setup.new_window": "หน้าต่างใหม่",
"horizon.splitscreen.setup.fill_monitor": "กรอก %s",
"horizon.splitscreen.setup.done": "เสร็จแล้ว",
"horizon.splitscreen.setup.on": "เปิด",
"horizon.splitscreen.setup.off": "ปิด",
"horizon.splitscreen.setup.player": "ผู้เล่น %s",
"horizon.splitscreen.setup.revert": "เปลี่ยนกลับ",
"horizon.splitscreen.setup.apply": "สมัคร",
"horizon.splitscreen.setup.warning.empty_main": "ไม่มีใครเล่นใน Window 1: มันซ่อนอยู่",
"horizon.splitscreen.setup.warning.empty_close": "ไม่มีใครเล่นใน Window %s: ปิดเมื่อสมัคร",
"horizon.splitscreen.setup.warning.empty_new": "ไม่มีใครเล่นใน Window %s: มันจะไม่เปิด",
"horizon.splitscreen.setup.warning.on_main": "Window %s เติมเต็มจอภาพของ Window 1: ผู้เล่นเล่นใน Window 1",
"horizon.splitscreen.setup.warning.unplugged": "ไม่ได้เชื่อมต่อจอภาพของ Window %s: ผู้เล่นเล่นใน Window 1",
"horizon.splitscreen.setup.status.off": "การแบ่งหน้าจอปิดอยู่",
"horizon.splitscreen.setup.status.enable_hint": "เปิดเครื่อง จากนั้นกดปุ่มบนคอนโทรลเลอร์อื่นในโลก",
"horizon.splitscreen.setup.status.join_hint": "กด A เพื่อเข้าร่วมและเลือกโปรไฟล์",
"horizon.splitscreen.setup.status.idle": "ไม่ได้ใช้งานการแบ่งหน้าจอ",
"horizon.splitscreen.setup.status.alone": "ไม่มีผู้เล่นท้องถิ่นรายอื่น",
"horizon.splitscreen.setup.status.solo_controls": "การควบคุมโซโลและการตอบสนองของคอนโทรลเลอร์ไม่มีการเปลี่ยนแปลง",
"horizon.splitscreen.setup.window_empty": "หน้าต่าง %s: ว่างเปล่า",
"horizon.splitscreen.setup.note.select": "คลิกที่เครื่องเล่น หรือลากไปที่หน้าต่างหรือจอภาพ",
"horizon.splitscreen.setup.note.apply": "สมัครเพื่อเล่นด้วยวิธีนี้ เปลี่ยนกลับเป็นเลิกทำ",
"horizon.splitscreen.setup.note.place": "%s ควรเล่นที่ไหน?",
"horizon.splitscreen.setup.this_player": "ผู้เล่นคนนี้",
"horizon.splitscreen.setup.switch_disabled": "Splitscreen จะปิดลงเมื่อคนอื่นๆ ออกไปแล้ว (เมนูหยุดชั่วคราว)",
"horizon.splitscreen.setup.window_place": "หน้าต่าง %s (%s จาก %s)",
"horizon.splitscreen.setup.names": "ชื่อ",
"horizon.splitscreen.setup.identify": "ระบุตัวตน",
"horizon.splitscreen.setup.layout.two": "2 การแบ่งปัน: %s",
"horizon.splitscreen.setup.layout.three": "3 การแบ่งปัน: %s",
"horizon.splitscreen.setup.layout.two.0": "อัตโนมัติ",
"horizon.splitscreen.setup.layout.two.1": "เคียงข้างกัน",
"horizon.splitscreen.setup.layout.two.2": "บนและล่าง",
"horizon.splitscreen.setup.layout.three.0": "ด้านบนกว้างหนึ่งอัน",
"horizon.splitscreen.setup.layout.three.1": "สูงหนึ่งทางด้านซ้าย",
"horizon.splitscreen.setup.layout.three.2": "เคียงข้างกัน",
"horizon.splitscreen.setup.help.player": "คลิกหรือลาก %s เพื่อย้าย",
"horizon.splitscreen.setup.help.layout_auto": "%s (เคียงข้างกันเมื่อหน้าต่างกว้าง) กดเพื่อเปลี่ยน",
"horizon.splitscreen.setup.help.layout": "%s. กดเพื่อเปลี่ยน",
"horizon.splitscreen.setup.help.switch": "แยกหน้าจอสำหรับคอมพิวเตอร์เครื่องนี้ เปิดหรือปิด",
"horizon.splitscreen.setup.help.identify": "มุมมองของผู้เล่นแต่ละคนจะแสดงให้เห็นว่าอยู่ในหน้าต่างใด",
"horizon.splitscreen.setup.help.names": "ชื่อผู้เล่นแต่ละคนในมุมมองของพวกเขา",
"horizon.splitscreen.setup.help.revert": "เลิกทำการเปลี่ยนแปลงที่ยังไม่ได้ใช้",
"horizon.splitscreen.setup.help.apply": "เล่นตามแผนที่แสดง",
"horizon.splitscreen.setup.help.unchanged": "ยังไม่มีอะไรเปลี่ยนแปลง",
"horizon.splitscreen.setup.give_up_pad": "ยอมแพ้แพด",
"horizon.splitscreen.prompt.controller_connected": "เชื่อมต่อคอนโทรลเลอร์แล้ว",
"horizon.splitscreen.prompt.controller_disconnected": "คอนโทรลเลอร์ถูกตัดการเชื่อมต่อ",
"horizon.splitscreen.prompt.controller_disconnected.hint": "เชื่อมต่อใหม่หรือกดปุ่มบนอีกอัน",
"horizon.splitscreen.prompt.join.one": "%s ต้องการเข้าร่วม",
"horizon.splitscreen.prompt.join.many": "%s ผู้ควบคุมต้องการเข้าร่วม",
"horizon.splitscreen.prompt.join.yes": "เข้าร่วม",
"horizon.splitscreen.prompt.join.as_p1": "เล่นเป็น P1",
"horizon.splitscreen.prompt.join.no": "ไม่",
"horizon.splitscreen.prompt.lost": "%s: คอนโทรลเลอร์ถูกตัดการเชื่อมต่อ",
"horizon.splitscreen.prompt.lost.use_another": "ใช้อันอื่น",
"horizon.splitscreen.prompt.lost.leave": "ลาออก",
"horizon.splitscreen.setup.help.give_up_pad": "ผู้ควบคุมของคุณหยุดขับรถคุณและได้รับการเสนอให้เข้าร่วม (A)",
"horizon.splitscreen.setup.note.held_at": "%s ถึง %s: หยดไว้ที่นี่ B วางมันกลับ",
"horizon.splitscreen.setup.note.held": "%s หยิบขึ้นมา: ซ้าย/ขวาเลือกโดยที่ A หยด B วางมันกลับ",
"Hides models behind opaque blocks. Async checks off-thread; entities tick.": "ซ่อนแบบจำลองไว้หลังบล็อกทึบแสง Async ตรวจสอบนอกเธรด เอนทิตีติ๊ก",
"Block Entities": "บล็อกเอนทิตี",
"Shulker Boxes": "กล่องชัลเกอร์",
"Reuses settled boxes; lid movement stays animated.": "นำกล่องที่ตัดสินแล้วกลับมาใช้ใหม่ การเคลื่อนไหวของฝายังคงเคลื่อนไหว",
"Signs": "สัญญาณ",
"Reuses sign text until text, light, or font changes.": "ใช้ข้อความเซ็นซ้ำจนกว่าข้อความ แสง หรือแบบอักษรจะเปลี่ยนไป",
"Decorated Pots": "กระถางตกแต่ง",
"Reuses still pots; break wobble and sherd changes redraw.": "นำหม้อกลับมาใช้ซ้ำ ทำลายการโยกเยกและฉีกการเปลี่ยนแปลงวาดใหม่",
"Bells": "ระฆัง",
"Reuses still bells; ringing stays animated.": "ใช้ซ้ำยังคงระฆัง; เสียงเรียกเข้ายังคงเคลื่อนไหว",
"Chests": "ทรวงอก",
"Reuses closed chests; moving lids stay animated.": "นำหีบปิดกลับมาใช้ซ้ำ ฝาที่ขยับได้จะเคลื่อนไหวได้",
"Banners": "แบนเนอร์",
"Reuses poles; flags and pattern layers still update.": "ใช้เสาซ้ำ ธงและเลเยอร์ลวดลายยังคงอัปเดตอยู่",
"Copper Golem Statues": "รูปปั้นโกเลมทองแดง",
"Reuses statue geometry until its block state changes.": "นำรูปทรงของรูปปั้นมาใช้ซ้ำจนกว่าสถานะบล็อกจะเปลี่ยนไป",
"Leaf Culling": "การคัดแยกใบ",
"Every leaf face. Vanilla's fancy leaves.": "หน้าใบไม้ทุกใบ ใบไม้แฟนซีของวานิลลา",
"Distant Plant Dither": "Dither พืชอันห่างไกล",
"Keeps fine plants in high-res packs from fading far away.": "เก็บรักษาต้นไม้ที่สวยงามไว้ในแพ็คที่มีความละเอียดสูงไม่ให้ซีดจางไปในระยะไกล",
"Screenshot Quality": "คุณภาพของภาพหน้าจอ",
"F2 screenshots at this many times the game's resolution. Higher takes longer.": "ภาพหน้าจอ F2 หลายครั้งตามความละเอียดของเกม สูงกว่าใช้เวลานานกว่า",
"Frame Generation": "การสร้างเฟรม",
"Shows a made-up frame between each two real ones: smoother, a little more lag.": "แสดงเฟรมที่ถูกสร้างขึ้นระหว่างเฟรมจริงสองเฟรม: นุ่มนวลกว่า แลคกว่าเล็กน้อย",
"Shadow Cache": "แคชเงา",
"Reuses the pack shadow map when sun, view and world match. Off by default.": "ใช้แผนที่เงาแพ็คซ้ำเมื่อดวงอาทิตย์ มุมมอง และโลกตรงกัน ปิดโดยค่าเริ่มต้น",
"Find BlueMap": "ค้นหาบลูแมป",
"On servers, finds their BlueMap web map for far terrain. Next join.": "บนเซิร์ฟเวอร์ ค้นหาแผนที่เว็บ BlueMap สำหรับภูมิประเทศที่ห่างไกล เข้าร่วมต่อไป.",
"BlueMap Radius": "รัศมี BlueMap",
"How far around you BlueMap tiles are downloaded. Next join.": "ดาวน์โหลดแผ่น BlueMap รอบตัวคุณไปไกลแค่ไหน เข้าร่วมต่อไป.",
"Synchronous": "ซิงโครนัส",
"Asynchronous": "แบบอะซิงโครนัส",
"Solid": "แข็ง",
"Solid Aggressive": "แข็งก้าวร้าว",
"Hollow": "ฮอลโลว์",
"Leaves fully inside a canopy draw solid: fewer see-through layers.": "ทิ้งไว้ในทรงพุ่มจนเต็มและดึงเป็นของแข็ง: ชั้นที่มองเห็นทะลุได้น้อยลง",
"Leaves with one open side draw solid too: faster, chunkier edges.": "ใบไม้ที่มีด้านเปิดด้านหนึ่งจะดึงให้แข็งเช่นกัน: ขอบจะหนาขึ้นและเร็วขึ้น",
"Drops faces between leaves: faster, but gaps look through.": "หยดหน้าระหว่างใบไม้: เร็วขึ้น แต่มีช่องว่างมองผ่าน",
"Hotbar: Previous Slot": "Hotbar: ช่องก่อนหน้า",
"Hotbar: Next Slot": "แถบด่วน: สล็อตถัดไป",
"horizon.agent.connected.one": "เชื่อมต่อแล้ว: 1 การเชื่อมต่อตัวแทน",
"horizon.agent.connected.many": "เชื่อมต่อแล้ว: %s การเชื่อมต่อตัวแทน",
"horizon.agent.connected.one_ago": "เชื่อมต่อแล้ว: การเชื่อมต่อตัวแทน 1 รายการ คำสั่งสุดท้าย %s s ที่แล้ว",
"horizon.agent.connected.many_ago": "เชื่อมต่อแล้ว: %s การเชื่อมต่อตัวแทน คำสั่งสุดท้าย %s s ที่แล้ว",
"horizon.agent.waiting": "รอตัวแทน.",
"horizon.agent.off": "ปิด: เจ้าหน้าที่ไม่สามารถเข้าถึงเกมนี้ได้",
"horizon.agent.session_opened": "เปิดสำหรับเซสชั่นนี้โดยโปรแกรมที่เริ่มเกม",
"horizon.agent.socket": "ซ็อกเก็ต: %s (คัดลอกรายละเอียดเพื่อดูเส้นทางแบบเต็ม)",
"horizon.agent.local_only": "ภายในเครื่องเท่านั้น: ตัวแทนบนคอมพิวเตอร์เครื่องนี้ ไม่ใช่เครือข่าย",
"%s nits": "%s ไนท์",
"Auto (%s nits)": "อัตโนมัติ (%s นิต)",
"%.2f nits": "%.2f ไนท์",
"Hides models behind opaque blocks. Entities update. Off with custom packs.": "ซ่อนแบบจำลองไว้หลังบล็อกทึบแสง อัปเดตเอนทิตี ปิดท้ายด้วยแพ็กแบบกำหนดเอง",
"horizon.extras.repro_keys": "ทางลัดการบันทึก",
"horizon.extras.repro_keys.tooltip": "F3+R เริ่มหรือหยุดการบันทึกซ้ำ และ F3+E เขียนบันเดิลของมัน ปิดตามค่าเริ่มต้น: การบันทึกจะคัดลอกโลก",
"horizon.agent.record_session": "เริ่มเซสชันการบันทึก",
"horizon.agent.record_stop": "หยุดเซสชันการบันทึก",
"horizon.agent.export_repro": "ส่งออกชุด Repro",
"horizon.repro.started": "เริ่มการบันทึกแล้ว F3+R หยุดมันและเขียนบันเดิล",
"horizon.repro.stopped": "การบันทึกหยุดลง: %s",
"horizon.repro.bundle": "ชุดจำลอง: %s",
"horizon.repro.error": "ทำซ้ำ: %s",
"horizon.repro.no_recording": "ยังไม่มีการบันทึกที่จะส่งออก",
"horizon.repro.replay_started": "เริ่มเล่นซ้ำ: %s",
"horizon.pack.addInfo": "เพิ่มชุดทรัพยากรจาก Modrinth",
"horizon.pack.addWorking": "ถามโมดรินธ์...",
"horizon.pack.addNone": "ไม่พบชุดทรัพยากร",
"horizon.pack.addTitle": "เพิ่มชุดทรัพยากร",
"horizon.pack.install": "ติดตั้ง",
"horizon.pack.installing": "กำลังติดตั้ง",
"horizon.pack.installed": "ติดตั้งแล้ว",
"horizon.pack.search": "ค้นหา",
"horizon.pack.searchHint": "ค้นหา Modrinth...",
"horizon.pack.filters": "ตัวกรอง",
"horizon.pack.filter.realistic": "สมจริง",
"horizon.pack.filter.simplistic": "เรียบง่าย",
"horizon.pack.filter.vanillaLike": "เหมือนวานิลลา",
"horizon.pack.addFailed": "ไม่สามารถเพิ่มแพ็กได้: %s",
"horizon.extras.header.cosmetics": "เครื่องสำอาง",
"horizon.extras.cosmetics_mine": "เครื่องสำอางของฉัน",
"horizon.extras.cosmetics_mine.tooltip": "ซ่อนเร้น: ผู้เล่น Horizon ทุกคนมองเห็นคุณโดยไม่ได้แต่งหน้า รวมไปถึงคุณด้วย สวิตช์แบบเดียวกับตู้เสื้อผ้าของตัวเรียกใช้งาน",
"horizon.extras.cosmetics_others": "เครื่องสำอางของผู้เล่นคนอื่น",
"horizon.extras.cosmetics_others.tooltip": "ชุดที่ผู้เล่น Horizon คนอื่นๆ ใส่: ทุกอย่าง เฉพาะรูปแบบป้ายชื่อของพวกเขา หรือไม่ใส่เลย ซ่อนเร้นเกมไม่เคยถามว่าพวกเขาสวมอะไร",
"horizon.extras.cosmetics_auras": "ออร่าและเส้นทางของผู้อื่น",
"horizon.extras.cosmetics_auras.tooltip": "ออร่าและเส้นทางที่ผู้เล่นคนอื่นสวมใส่ ปิดโดยค่าเริ่มต้น",
"horizon.extras.cosmetics.shown": "แสดงแล้ว",
"horizon.extras.cosmetics.hidden": "ซ่อนเร้น",
"horizon.extras.cosmetics.name_tags": "ป้ายชื่อเท่านั้น"
}
@@ -194,6 +194,10 @@
"horizon.shader_options.open": "Gölgelendirici Seçenekleri…",
"horizon.shader_options.profile": "Profil",
"horizon.shader_options.loading": "Gölgelendirici paketinin seçenekleri okunuyor…",
"Particle Culling": "Particle Culling",
"Draws every particle.": "Draws every particle.",
"Skips offscreen, subpixel and terrain-hidden particles.": "Skips offscreen, subpixel and terrain-hidden particles.",
"Skips offscreen, subpixel and terrain-hidden particles with less render-thread work.": "Skips offscreen, subpixel and terrain-hidden particles with less render-thread work.",
"General": "Genel",
"Advanced": "Gelişmiş",
"Undo": "Geri al",
@@ -456,5 +456,9 @@
"horizon.repro.bundle": "Пакет відтворення: %s",
"horizon.repro.error": "Відтворення: %s",
"horizon.repro.no_recording": "Поки немає запису для експорту.",
"horizon.repro.replay_started": "Відтворення почато: %s"
"horizon.repro.replay_started": "Відтворення почато: %s",
"Particle Culling": "Відсікання частинок",
"Draws every particle.": "Малює всі частинки.",
"Skips offscreen, subpixel and terrain-hidden particles.": "Пропускає частинки поза екраном, менші за піксель і закриті місцевістю.",
"Skips offscreen, subpixel and terrain-hidden particles with less render-thread work.": "Пропускає частинки поза екраном, менші за піксель і закриті місцевістю, зменшуючи роботу потоку рендерингу."
}
@@ -0,0 +1,489 @@
{
"horizon.options.controller": "Bộ điều khiển",
"horizon.options.vibration": "Rung",
"horizon.options.adaptive_triggers": "Trình kích hoạt thích ứng",
"horizon.options.lightbar": "thanh đèn",
"horizon.options.look_sensitivity": "Độ nhạy góc nhìn",
"horizon.options.invert_x": "Đảo trục nhìn X",
"horizon.options.invert_y": "Đảo trục nhìn Y",
"horizon.options.sneak_button": "Nút lén lút",
"horizon.options.move_deadzone": "Vùng chết di chuyển",
"horizon.options.look_deadzone": "Vùng chết góc nhìn",
"horizon.options.button_glyphs": "Biểu tượng nút",
"horizon.options.menu_navigation": "Điều hướng menu",
"horizon.options.on_screen_keyboard": "Bàn phím ảo",
"horizon.options.chat_delay": "Trì hoãn trò chuyện",
"horizon.options.lightbar.health": "sức khỏe",
"horizon.options.lightbar.dimension": "Kích thước",
"horizon.options.glyphs.auto": "Tự động",
"horizon.options.menu_focus": "Tập trung",
"horizon.options.menu_pointer": "Con trỏ",
"horizon.options.keyboard.auto": "Tự động",
"horizon.options.keyboard.steam": "hơi nước",
"horizon.options.unavailable": "Tính năng này chưa có ở Horizon.",
"horizon.options.search": "Cài đặt tìm kiếm...",
"horizon.pages.mods": "mod",
"horizon.pages.shader_packs": "Gói đổ bóng",
"horizon.pages.shader_options": "Tùy chọn đổ bóng",
"horizon.pages.controller": "Cài đặt bộ điều khiển",
"horizon.pages.controller_binds": "Liên kết điều khiển",
"horizon.pages.extras": "Tiện ích bổ sung của Horizon",
"horizon.pages.settings": "Cài đặt Horizon",
"horizon.pages.agent": "Đặc vụ AI",
"horizon.split.leave": "Rời khỏi",
"horizon.pages.split_settings": "Cài đặt chia đôi màn hình",
"horizon.pages.split_profiles": "Ai đang chơi?",
"horizon.pages.split_setup": "Thiết lập màn hình chia nhỏ",
"horizon.pages.music": "Âm nhạc",
"horizon.pages.music.menu": "Thực đơn",
"horizon.pages.music.overworld": "Thế giới ngầm",
"horizon.pages.music.creative": "sáng tạo",
"horizon.pages.music.underwater": "Dưới nước",
"horizon.pages.music.end": "Sự kết thúc",
"horizon.pages.music.boss": "Ông chủ",
"horizon.pages.music.credits": "Tín dụng",
"horizon.pages.music.overworld_biomes": "Quần xã sinh vật thế giới ngầm",
"horizon.pages.music.nether_biomes": "quần xã sinh vật địa ngục",
"horizon.pages.music.end_biomes": "Quần xã sinh vật kết thúc",
"horizon.pages.music.other": "Âm nhạc khác",
"horizon.pages.music.empty": "Không có bản nhạc: âm thanh của trò chơi không được tải.",
"horizon.pages.music.tooltip": "Các bản nhạc tích hợp, tùy theo tình huống: phát một bản ngay bây giờ hoặc tắt bất kỳ bản nhạc nào để trò chơi ngừng chọn bản nhạc đó.",
"horizon.pages.settings.tooltip": "Cài đặt riêng của Horizon: đồ họa, bộ điều khiển, tính năng bổ sung và mod.",
"horizon.pages.graphics.tooltip": "Đồ họa, đơn giản là: mỗi cài đặt cho biết giá của nó.",
"horizon.pages.graphics_advanced.tooltip": "Mọi cài đặt đồ họa, bao gồm cả Horizon, với giá của từng cài đặt.",
"horizon.pages.controller.tooltip": "Bộ điều khiển: các nút, gậy, độ rung và điều hướng menu.",
"horizon.pages.extras.tooltip": "Các bổ sung tùy chọn, tất cả đều bị tắt theo mặc định: trò chơi vẫn giữ nguyên cho đến khi bạn bật một trò chơi.",
"horizon.pages.agent.tooltip": "Hãy để tác nhân AI của riêng bạn chơi: máy khách Horizon-ctl và MCP trên máy tính này.",
"horizon.pages.split_profiles.tooltip": "Ai chơi: hồ sơ được lưu trong thư mục trò chơi này.",
"horizon.pages.split_setup.tooltip": "Cửa sổ và màn hình, ai chơi ở đâu.",
"horizon.pages.shader_packs.tooltip": "Gói Shader từ thư mục shaderpacks: của Horizon và những gói ở định dạng shader/. Một người chạy một lúc.",
"horizon.pages.mods.tooltip": "Các mod được tạo cho Horizon, từ thư mục Horizon-mods. Mỗi cái chạy trong hộp cát và tắt cho đến khi bạn bật nó lên.",
"horizon.pages.open.graphics": "Đồ họa...",
"horizon.pages.open.graphics_advanced": "Đồ họa nâng cao...",
"horizon.pages.open.shader_packs": "Gói đổ bóng...",
"horizon.pages.open.controller": "Cài đặt bộ điều khiển...",
"horizon.pages.open.split_setup": "Chia đôi màn hình...",
"horizon.pages.open.extras": "Tiện ích bổ sung...",
"horizon.pages.open.mods": "Mod...",
"horizon.pages.open.agent": "Đặc vụ AI...",
"horizon.pages.open.horizon_graphics": "Đồ họa Horizon...",
"horizon.pages.open.controller_binds": "Bộ điều khiển liên kết...",
"horizon.pages.open.horizon_settings": "Cài đặt Horizon...",
"horizon.pages.open.music": "Âm nhạc...",
"horizon.mods.empty": "Không có mod: đặt tệp .hmod vào thư mục Horizon-mods",
"horizon.mods.stopped": " (Đã dừng)",
"horizon.mods.not_built": " (Chưa được xây dựng)",
"horizon.mods.dev": " (Nhà phát triển)",
"horizon.mods.settings": "Cài đặt",
"horizon.mods.in_world": " (để thế giới thay đổi)",
"horizon.mods.open_folder": "Mở thư mục Mod",
"horizon.shader_packs.empty": "Không có gói shader: đặt chúng vào thư mục shaderpacks",
"horizon.shader_options.open": "Tùy chọn đổ bóng...",
"horizon.shader_options.profile": "Hồ sơ",
"horizon.shader_options.loading": "Đọc các tùy chọn của gói đổ bóng...",
"horizon.agent.copy_details": "Sao chép chi tiết kết nối",
"horizon.multiplayer.join": "Tham gia",
"horizon.multiplayer.cancel_reconnecting": "Hủy kết nối lại",
"horizon.multiplayer.join_friend": "Tham gia cùng một người bạn",
"horizon.multiplayer.invite_code": "Mã mời",
"horizon.multiplayer.relay": "Rơle (tùy chọn)",
"Preset": "cài sẵn",
"LOD Distance": "Khoảng cách LOD",
"Far Detail": "Chi tiết xa",
"Cave Culling": "Phá hủy hang động",
"Entity Culling": "Tiêu hủy thực thể",
"Chunk Updates": "Cập nhật đoạn",
"Upload Budget": "Tải lên ngân sách",
"Sky": "bầu trời",
"Fog": "Sương mù",
"Weather": "Thời tiết",
"Animated Textures": "Họa tiết hoạt hình",
"Present Mode": "Chế độ hiện tại",
"Frame Pacing": "Tốc độ khung hình",
"Worker Threads": "Chủ đề công nhân",
"Resolution Scale": "Thang đo độ phân giải",
"Anti-aliasing": "Khử răng cưa",
"Upscaling": "Nâng cấp",
"Paper White": "Giấy trắng",
"Peak Brightness": "Độ sáng cực đại",
"Black Level": "Cấp độ đen",
"UI Brightness": "Độ sáng giao diện người dùng",
"Battery Mode": "Chế độ pin",
"Graphics API": "API đồ họa",
"Translucent Batching": "Trộn mờ",
"Performance Overlay": "Lớp phủ hiệu suất",
"Full Detail Distance": "Khoảng cách chi tiết đầy đủ",
"On": "Bật",
"Off": "Tắt",
"Unlimited": "Không giới hạn",
"Auto": "Tự động",
"Custom": "tùy chỉnh",
"Performance": "Hiệu suất",
"Balanced": "Cân bằng",
"Quality": "chất lượng",
"Ultra": "siêu",
"Ultra Performance": "Hiệu suất cực cao",
"Native": "Bản địa",
"Full": "Đầy đủ",
"Reduced": "Giảm",
"Efficient": "Hiệu quả",
"Precise": "Chính xác",
"Auto (VSync)": "Tự động (VSync)",
"Mailbox": "Hộp thư",
"Immediate": "ngay lập tức",
"FPS and Graph": "FPS và đồ thị",
"No cost": "Không mất phí",
"Low cost": "Chi phí thấp",
"Medium cost": "Chi phí trung bình",
"High cost": "Chi phí cao",
"Saves time": "Tiết kiệm thời gian",
"Graphics": "đồ họa",
"Done": "Xong",
"This feature is not yet available in Horizon.": "Tính năng này chưa có ở Horizon.",
"Your display or system doesn't offer HDR output.": "Màn hình hoặc hệ thống của bạn không cung cấp đầu ra HDR.",
"Turn HDR on to use it.": "Bật HDR để sử dụng.",
"Your GPU or graphics API doesn't support it.": "GPU hoặc API đồ họa của bạn không hỗ trợ nó.",
"%s chunks": "%s khối",
"%s per frame": "%s mỗi khung hình",
"%s MiB/frame": "%s MiB/khung",
"%s KiB/frame": "%s KiB/khung",
"Auto (%s)": "Tự động (%s)",
"Full-detail terrain range. LOD Distance can extend local worlds farther.": "Phạm vi địa hình đầy đủ chi tiết. Khoảng cách LOD có thể mở rộng thế giới địa phương xa hơn.",
"Coarse distant terrain in local worlds. Integrated GPUs stop at 128 chunks.": "Địa hình xa xôi trong thế giới địa phương. GPU tích hợp dừng ở 128 khối.",
"Reduced draws far terrain coarser: faster on this integrated GPU.": "Giảm khả năng vẽ địa hình ở xa thô hơn: nhanh hơn trên GPU tích hợp này.",
"Reduced draws far terrain coarser, for GPUs it slows down.": "Giảm làm cho địa hình ở xa trở nên thô hơn, đối với GPU thì tốc độ này chậm lại.",
"Field of view. Wider shows more terrain at once.": "Trường nhìn. Rộng hơn hiển thị nhiều địa hình hơn cùng một lúc.",
"Caps frames per second; a cap saves power and heat.": "Giới hạn khung hình mỗi giây; nắp giúp tiết kiệm điện và nhiệt.",
"Waits for the display's refresh: no tearing, a little latency.": "Chờ làm mới màn hình: không bị rách, độ trễ một chút.",
"Size of menus and the HUD.": "Kích thước của menu và HUD.",
"Sets the options below together. Changing one makes it Custom.": "Đặt các tùy chọn bên dưới cùng nhau. Thay đổi một cái sẽ làm cho nó tùy chỉnh.",
"Lava, fire and sunlight shine brighter than white. Needs an HDR display.": "Dung nham, lửa và ánh sáng mặt trời tỏa sáng hơn màu trắng. Cần màn hình HDR.",
"Your display's darkest black. 0 for OLED; LCDs glow a little.": "Màn hình của bạn có màu đen tối nhất. 0 cho OLED; LCD phát sáng một chút.",
"How bright highlights get. Auto: the peak your system reports.": "Làm thế nào sáng nổi bật có được. Tự động: mức cao nhất mà hệ thống của bạn báo cáo.",
"How bright white paper and menus look. Auto: your desktop's white.": "Giấy và menu trắng sáng trông như thế nào. Tự động: màn hình của bạn màu trắng.",
"How bright the HUD and menus are, against paper white.": "HUD và các menu sáng như thế nào so với màu trắng của giấy.",
"How far mobs, crops and machines keep working. CPU time.": "Đám đông, cây trồng và máy móc tiếp tục hoạt động bao xa. thời gian CPU.",
"How far away mobs and items are drawn, as a share of normal.": "Khoảng cách mà mob và vật phẩm được rút ra là một phần bình thường.",
"Skips terrain hidden behind closed sections. Off costs a lot.": "Bỏ qua địa hình ẩn sau các phần đã đóng. Giảm chi phí rất nhiều.",
"Hides entities behind opaque blocks.": "Ẩn các thực thể đằng sau các khối mờ đục.",
"No entity occlusion culling.": "Không loại bỏ thực thể tắc nghẽn.",
"CPU occlusion test runs this frame.": "Kiểm tra tắc nghẽn CPU chạy khung này.",
"Occlusion checks run on a worker thread.": "Kiểm tra tắc nghẽn chạy trên một luồng công nhân.",
"Meshed sections uploaded per frame. Lower is smoother while loading.": "Các phần có lưới được tải lên trên mỗi khung. Thấp hơn là mượt mà hơn trong khi tải.",
"Soft shadows in corners. Costs chunk building time only.": "Bóng mềm ở các góc. Chỉ tốn thời gian xây dựng.",
"Smaller copies of block textures for distant terrain: less shimmer.": "Bản sao nhỏ hơn của kết cấu khối dành cho địa hình ở xa: ít lung linh hơn.",
"Blends grass and water colours across biomes when building chunks.": "Pha trộn màu cỏ và màu nước trên các quần xã khi xây dựng khối.",
"Cloud layer: off, flat (fast) or 3D (fancy).": "Lớp đám mây: tắt, phẳng (nhanh) hoặc 3D (ưa thích).",
"How far clouds reach, in chunks.": "Đám mây bay tới bao xa, theo từng khối.",
"Draws the sky, sun, moon and stars.": "Vẽ bầu trời, mặt trời, mặt trăng và các ngôi sao.",
"Distance fog. Off shows the edge of the loaded world.": "Khoảng cách sương mù. Tắt hiển thị rìa của thế giới được tải.",
"Draws rain and snow.": "Vẽ mưa và tuyết.",
"How far rain and snow fall around you.": "Bao xa mưa và tuyết rơi xung quanh bạn.",
"How many particles effects spawn.": "Có bao nhiêu hạt hiệu ứng sinh ra.",
"Round shadows under mobs and items.": "Bóng tròn dưới mob và vật phẩm.",
"Leaves with see-through gaps. Off draws them solid.": "Lá có khoảng trống nhìn xuyên qua. Tắt kéo họ vững chắc.",
"Sorts water and glass more exactly behind each other.": "Sắp xếp nước và thủy tinh chính xác hơn ở phía sau nhau.",
"Which chunk rebuilds wait for the frame: none, nearby or yours.": "Đoạn nào được xây dựng lại chờ khung: không có, ở gần hoặc của bạn.",
"Animates water, lava, fire and other moving textures.": "Hoạt hình nước, dung nham, lửa và các kết cấu chuyển động khác.",
"World pixels per screen pixel. Below 100% is faster on the GPU.": "Pixel thế giới trên mỗi pixel màn hình. Dưới 100% là nhanh hơn trên GPU.",
"Smooths jagged edges. FXAA: softer. TAA: smoothest, moving things may trail.": "Làm mịn các cạnh lởm chởm. FXAA: nhẹ nhàng hơn. TAA: êm ái nhất, mọi thứ chuyển động có thể bị kéo theo.",
"Renders the world smaller and rebuilds it with TAA. Faster, softer.": "Làm cho thế giới nhỏ hơn và xây dựng lại nó bằng TAA. Nhanh hơn, nhẹ nhàng hơn.",
"HDR output on an HDR display: lava, fire and sunlight shine brighter.": "Đầu ra HDR trên màn hình HDR: dung nham, lửa và ánh sáng mặt trời tỏa sáng hơn.",
"How frames reach the screen while VSync is off.": "Cách các khung hình tiếp cận màn hình khi VSync tắt.",
"Efficient sleeps until the next frame; Precise spins, like vanilla.": "Ngủ hiệu quả cho đến khung hình tiếp theo; Những vòng quay chính xác, giống như vani.",
"Fills the screen (borderless).": "Lấp đầy màn hình (không viền).",
"Brightens dark places.": "Làm sáng những nơi tối tăm.",
"Lowers the frame rate when minimised, or idle too.": "Giảm tốc độ khung hình khi ở mức tối thiểu hoặc khi không hoạt động.",
"Sways the view while walking.": "Thay đổi tầm nhìn khi đi bộ.",
"Fades newly loaded chunks in.": "Làm mờ dần các đoạn mới được tải vào.",
"Darkens the screen's edges.": "Làm tối các cạnh của màn hình.",
"Shows when the world saves.": "Hiển thị khi thế giới cứu.",
"Shows attack cooldown.": "Hiển thị thời gian hồi chiêu của đòn tấn công.",
"60 FPS cap (30 in menus or unfocused), half the workers: less power.": "Giới hạn 60 FPS (30 trong menu hoặc không tập trung), một nửa số công nhân: ít năng lượng hơn.",
"Threads that generate, light and mesh chunks. Next start.": "Các chủ đề tạo ra các khối ánh sáng và lưới. Bắt đầu tiếp theo.",
"Vulkan, then DirectX 12 (Windows) or OpenGL (Linux) where it fails. Next start.": "Vulkan, sau đó là DirectX 12 (Windows) hoặc OpenGL (Linux) bị lỗi. Bắt đầu tiếp theo.",
"Water and glass in one buffer: fewer draw calls, a bit more VRAM. Next start.": "Nước và thủy tinh trong một bộ đệm: ít lệnh gọi rút hơn, nhiều VRAM hơn một chút. Bắt đầu tiếp theo.",
"Mesh data sent to the GPU per frame. Lower is smoother while loading.": "Dữ liệu lưới được gửi tới GPU trên mỗi khung hình. Thấp hơn là mượt mà hơn trong khi tải.",
"Frame rate and frame times over the game, with a graph.": "Tốc độ khung hình và thời gian khung hình trong trò chơi, kèm theo biểu đồ.",
"horizon.multiplayer.finding_friend": "Đang tìm kiếm thế giới của bạn bè bạn...",
"horizon.multiplayer.not_signed_in": "Máy chủ này đang ở chế độ trực tuyến. Đăng nhập bằng tài khoản Microsoft của bạn trong trình khởi chạy Horizon để tham gia.",
"horizon.multiplayer.invalid_address": "Địa chỉ máy chủ không hợp lệ: %s",
"horizon.multiplayer.connected_friend_direct": "Đã kết nối thẳng với bạn bè của bạn...",
"horizon.multiplayer.connected_friend_relay": "Đã kết nối với bạn bè của bạn thông qua rơle...",
"General": "chung",
"Advanced": "Nâng cao",
"Undo": "Hoàn tác",
"Search options": "Tùy chọn tìm kiếm",
"Shortcut": "Phím tắt",
"Distance": "Khoảng cách",
"Display": "Hiển thị",
"Interface": "Giao diện",
"Sky and weather": "Bầu trời và thời tiết",
"Lighting and entities": "Ánh sáng và thực thể",
"Textures": "Kết cấu",
"Image": "Hình ảnh",
"Chunk loading": "Tải từng đoạn",
"Culling": "Loại bỏ",
"Power": "Quyền lực",
"Frames": "Khung",
"Overlay": "Lớp phủ",
"Output": "đầu ra",
"Brightness": "Độ sáng",
"How far you see, the window and the HUD.": "Bạn nhìn thấy bao xa, cửa sổ và HUD.",
"The sky and weather, lighting, textures and the image.": "Bầu trời và thời tiết, ánh sáng, kết cấu và hình ảnh.",
"Chunk loading, culling and power use.": "Tải chunk, loại bỏ và sử dụng năng lượng.",
"How frames reach the screen, and the performance overlay.": "Cách khung hình tiếp cận màn hình và lớp phủ hiệu suất.",
"Brighter-than-white output on an HDR display.": "Đầu ra sáng hơn màu trắng trên màn hình HDR.",
"Results for \"%s\"": "Kết quả cho \"%s\"",
"No settings match.": "Không có cài đặt nào phù hợp.",
"horizon.title.not_affiliated": "Không liên kết với Mojang hoặc Microsoft",
"horizon.extras.header.lighting": "Chiếu sáng",
"horizon.extras.header.third_person": "Người thứ ba",
"horizon.extras.header.particles": "hạt",
"horizon.extras.header.inventory": "Hàng tồn kho",
"horizon.extras.header.chat": "Trò chuyện",
"horizon.extras.header.multiplayer": "Nhiều người chơi",
"horizon.extras.header.sound": "Âm thanh",
"horizon.extras.header.menus": "Thực đơn",
"horizon.extras.dynamic_lights": "Đèn năng động",
"horizon.extras.own_name_tag": "Thẻ tên riêng",
"horizon.extras.hide_block_particles": "Ẩn các hạt phá khối",
"horizon.extras.auto_reconnect": "Tự động kết nối lại",
"horizon.extras.ui_sound_reserve": "Giữ các kênh cho âm thanh giao diện người dùng",
"horizon.extras.music_page": "Trang âm nhạc",
"horizon.extras.mouse_tweaks": "Điều khiển tinh chỉnh chuột",
"horizon.extras.mouse_tweaks_wheel": "Bánh xe cuộn di chuyển các mục",
"horizon.extras.sort": "Nút sắp xếp",
"horizon.extras.sort_key": "Phím sắp xếp",
"horizon.extras.no_ai": "Không có AI",
"horizon.extras.agent_control": "Kiểm soát đại lý",
"horizon.extras.discord_presence": "Sự hiện diện phong phú của Discord",
"horizon.extras.splitscreen": "màn hình chia nhỏ",
"horizon.extras.chat_animation": "Trò chuyện mượt mà",
"horizon.extras.chat_indicator": "Chỉ báo tin nhắn",
"horizon.extras.wheel_cycles_settings": "Bánh xe cuộn thay đổi cài đặt",
"horizon.extras.pack_browser": "Trình duyệt gói tài nguyên",
"horizon.extras.fullbright.tooltip": "Hiển thị các khối và thực thể ở mức ánh sáng đầy đủ, ngay cả trong vùng tối.",
"horizon.extras.dynamic_lights.tooltip": "Đuốc và các nguồn sáng khác được giữ, thả hoặc đốt sẽ chiếu sáng các khối xung quanh chúng.",
"horizon.extras.own_name_tag.tooltip": "Hiển thị tên của bạn phía trên đầu ở ngôi thứ ba, như những người chơi khác nhìn thấy. Ẩn khi máy chủ ẩn tên nhóm của bạn hoặc bạn vô hình.",
"horizon.extras.hide_block_particles.tooltip": "Ẩn các mảnh vụn vỡ ra từ một khối bị vỡ và vỡ vụn ra khỏi khối bạn khai thác. Các hạt khác ở lại.",
"horizon.extras.auto_reconnect.tooltip": "Tham gia lại máy chủ sau khi mất kết nối hoặc khởi động lại, không bao giờ sau khi bị kick hoặc ban.",
"horizon.extras.ui_sound_reserve.tooltip": "Âm thanh trên thế giới để lại 16 trong số 247 kênh âm thanh miễn phí, do đó, một lượng lớn chúng (một vụ nổ lớn) không thể làm im lặng những cú nhấp chuột vào menu.",
"horizon.extras.music_page.tooltip": "Âm nhạc & Âm thanh có trang Âm nhạc...: phát bất kỳ bản nhạc tích hợp nào ngay bây giờ hoặc tắt một bản nhạc để trò chơi ngừng chọn bản nhạc đó. Không có gì thay đổi cho đến khi bạn tắt một bản nhạc.",
"horizon.extras.mouse_tweaks.tooltip": "Kéo phải đặt một vị trí trên mỗi ô, kéo trái sẽ tập hợp vật phẩm đã giữ, Shift + kéo trái sẽ di chuyển từng ô.",
"horizon.extras.mouse_tweaks_wheel.tooltip": "Xuống gửi một mục của khe sang phía bên kia, lên mang một mục trở lại.",
"horizon.extras.sort.tooltip": "Sắp xếp kho, rương, thùng, rương ender và hộp shulker theo thứ tự tab sáng tạo, hợp nhất các ngăn xếp.",
"horizon.extras.sort_key.tooltip": "Sắp xếp phần dưới con trỏ. Nhấp, sau đó nhấn một phím; Thoát khỏi ràng buộc nó.",
"horizon.extras.no_ai.tooltip": "Ẩn và tắt mọi tính năng AI: kiểm soát tác nhân, Horizon-ctl và máy chủ MCP. Công tắc của launcher cũng vậy.",
"horizon.extras.agent_control.tooltip": "Tác nhân AI của riêng bạn chỉ có thể chơi trò chơi này thông qua Horizon-ctl hoặc ứng dụng khách MCP, trên máy tính này.",
"horizon.extras.discord_presence.tooltip": "Hiển thị Playing Horizon trên hồ sơ Discord của bạn trong khi Discord chạy: menu, trình phát đơn hoặc nhiều người chơi, kích thước và thời gian chơi. Không bao giờ có tên thế giới hoặc địa chỉ máy chủ.",
"Calibrate...": "Hiệu chỉnh...",
"Calibrate Anyway...": "Hiệu chỉnh dù sao...",
"Use Automatic Setup": "Sử dụng thiết lập tự động",
"Shortcut: %s": "Phím tắt: %s",
"Next": "Tiếp theo",
"HDR Calibration %s/%s: %s": "Hiệu chỉnh HDR %s/%s: %s",
"Sets the three below full screen, one test picture at a time.": "Đặt ba hình ảnh bên dưới toàn màn hình, mỗi lần một hình ảnh thử nghiệm.",
"A key that opens this screen from the game. Not bound at first.": "Một chiếc chìa khóa mở màn hình này từ trò chơi. Lúc đầu không bị ràng buộc.",
"Your display didn't say how bright it gets: calibrate to set it up.": "Màn hình của bạn không cho biết độ sáng: hãy hiệu chỉnh để thiết lập.",
"Already set up for your display. Only calibrate if HDR looks wrong.": "Đã được thiết lập cho màn hình của bạn. Chỉ hiệu chỉnh nếu HDR có vẻ sai.",
"Puts Peak Brightness and Paper White back to your display's setup.": "Đưa Độ sáng tối đa và Giấy trắng trở lại thiết lập màn hình của bạn.",
"Set up for your display. Leave on Auto unless it looks wrong.": "Thiết lập cho màn hình của bạn. Để ở chế độ Tự động trừ khi có vẻ sai.",
"Lower it until the logo just disappears into the black.": "Hạ thấp nó cho đến khi logo biến mất thành màu đen.",
"Raise it until the logo just disappears into the bright square.": "Nâng nó lên cho đến khi logo vừa biến mất vào hình vuông sáng.",
"Make the card a white that's comfortable to look at for a long time, in the light you play in.": "Làm cho lá bài có màu trắng để bạn có thể thoải mái nhìn trong thời gian dài dưới ánh sáng bạn chơi.",
"horizon.splitscreen.profiles.forget": "quên đi",
"horizon.splitscreen.profiles.create": "Tạo",
"horizon.splitscreen.profiles.you": " - bạn",
"horizon.splitscreen.profiles.forget_named": "Quên %s",
"horizon.splitscreen.profiles.previous": "trước đó",
"horizon.splitscreen.profiles.next": "Tiếp theo",
"horizon.splitscreen.profiles.new_button": "Hồ sơ mới...",
"horizon.splitscreen.profiles.forget_title": "Quên hồ sơ?",
"horizon.splitscreen.profiles.forget_leaves": "Nó rời khỏi danh sách của trường hợp này.",
"horizon.splitscreen.profiles.forget_kept": "Tiến bộ và cài đặt thế giới được lưu giữ.",
"horizon.splitscreen.profiles.new_title": "Hồ sơ mới",
"horizon.splitscreen.profiles.name_hint": "Tên (3 đến 16 chữ cái, chữ số, _)",
"horizon.splitscreen.profiles.switch_title": "Chuyển hồ sơ",
"horizon.splitscreen.profiles.offline_note": "Hồ sơ ngoại tuyến thuộc về trường hợp này",
"horizon.splitscreen.profiles.move": "Di chuyển đến nơi bạn chơi",
"horizon.splitscreen.profiles.move_place": "Di chuyển đến nơi bạn chơi: %s",
"horizon.friends.title": "Chơi với bạn bè",
"horizon.friends.hint": "Bạn bè dán mã sau nút Bạn bè của màn hình tiêu đề, trong Kết nối Trực tiếp hoặc trên trang Play của trình khởi chạy.",
"horizon.friends.copied": "Đã sao chép",
"horizon.friends.copy_code": "Sao chép mã",
"horizon.friends.stop_sharing": "Dừng chia sẻ",
"horizon.friends.none_yet": "Chưa có bạn bè ở đây.",
"horizon.friends.here_now": "Ở đây bây giờ: %s",
"horizon.friends.share_intro": "Chia sẻ thế giới này đằng sau mã mời: nó mở ra mạng LAN và bạn bè trên internet tham gia bằng mã. Không có máy chủ của chúng tôi có liên quan.",
"horizon.friends.start_sharing": "Bắt đầu chia sẻ",
"horizon.friends.troubleshooting": "Đang khắc phục sự cố...",
"horizon.friends.stopped": "Đã dừng chia sẻ mã mời.",
"horizon.friends.short_code_changed": "Ai đó liên tục thử sai mã ngắn nên nó đã thay đổi.",
"horizon.friends.wrong_code": "Ai đó đã thử nhập sai mã.",
"horizon.friends.code_ready": "Mã mời của bạn đã sẵn sàng: Menu trò chơi, Chơi cùng bạn bè. Sao chép nó và gửi cho bạn bè của bạn.",
"horizon.friends.share_failed": "Không thể chia sẻ thế giới: %s",
"horizon.friends.finding_route": "Đang tìm cách bạn bè có thể liên hệ với bạn…",
"horizon.osk.shift": "ca",
"horizon.osk.space": "không gian",
"horizon.osk.delete": "Xóa",
"horizon.osk.type": "Loại",
"horizon.osk.symbols": "Biểu tượng",
"horizon.osk.close": "Đóng",
"horizon.extras.chat_animation.tooltip": "Một dòng trò chuyện mới trượt vào từ bên trái trong khi nó mờ dần thay vì xuất hiện nguyên vẹn.",
"horizon.extras.chat_indicator.tooltip": "Thanh màu ở bên trái dòng trò chuyện.",
"horizon.extras.wheel_cycles_settings.tooltip": "Con lăn qua một nút trong cài đặt sẽ thay đổi giá trị của nó, như trong vanilla. Tắt, bánh xe chỉ cuộn danh sách.",
"horizon.extras.pack_browser.tooltip": "Chọn Gói tài nguyên sẽ có nút Thêm để tìm kiếm Modrinth và cài đặt gói vào thư mục gói của bạn. Tắt, trò chơi không bao giờ liên lạc với Modrinth.",
"horizon.extras.splitscreen.tooltip": "Trong một thế giới, một bộ điều khiển khác có thể tham gia với tư cách là người chơi mới: nhấn A khi được yêu cầu, sau đó chọn hồ sơ và nơi chơi.",
"horizon.splitscreen.setup.monitor": "Giám sát %s",
"horizon.splitscreen.setup.monitor_unknown": "một màn hình",
"horizon.splitscreen.setup.window": "Cửa sổ %s",
"horizon.splitscreen.setup.new_window": "Cửa sổ mới",
"horizon.splitscreen.setup.fill_monitor": "Điền %s",
"horizon.splitscreen.setup.done": "Xong",
"horizon.splitscreen.setup.on": "Bật",
"horizon.splitscreen.setup.off": "Tắt",
"horizon.splitscreen.setup.player": "Người chơi %s",
"horizon.splitscreen.setup.revert": "Hoàn nguyên",
"horizon.splitscreen.setup.apply": "Áp dụng",
"horizon.splitscreen.setup.warning.empty_main": "Không ai chơi trong Cửa sổ 1: nó ẩn",
"horizon.splitscreen.setup.warning.empty_close": "Không ai chơi trong Cửa sổ %s: nó đóng khi Áp dụng",
"horizon.splitscreen.setup.warning.empty_new": "Không ai chơi trong Window %s: nó không mở",
"horizon.splitscreen.setup.warning.on_main": "Cửa sổ %s lấp đầy màn hình của Cửa sổ 1: người chơi của nó chơi trong Cửa sổ 1",
"horizon.splitscreen.setup.warning.unplugged": "Màn hình của Cửa sổ %s không được kết nối: người chơi của nó chơi trong Cửa sổ 1",
"horizon.splitscreen.setup.status.off": "Màn hình chia nhỏ đã tắt.",
"horizon.splitscreen.setup.status.enable_hint": "Bật nó lên, sau đó nhấn nút trên bộ điều khiển khác trong thế giới.",
"horizon.splitscreen.setup.status.join_hint": "Nhấn A để tham gia và chọn một hồ sơ.",
"horizon.splitscreen.setup.status.idle": "Màn hình chia nhỏ không hoạt động",
"horizon.splitscreen.setup.status.alone": "Không có người chơi địa phương khác.",
"horizon.splitscreen.setup.status.solo_controls": "Điều khiển solo và phản hồi của bộ điều khiển không thay đổi.",
"horizon.splitscreen.setup.window_empty": "Cửa sổ %s: trống",
"horizon.splitscreen.setup.note.select": "Nhấp vào trình phát hoặc kéo trình phát đó vào cửa sổ hoặc màn hình.",
"horizon.splitscreen.setup.note.apply": "Áp dụng để chơi theo cách này, Hoàn nguyên để hoàn tác.",
"horizon.splitscreen.setup.note.place": "%s nên chơi ở đâu?",
"horizon.splitscreen.setup.this_player": "người chơi này",
"horizon.splitscreen.setup.switch_disabled": "Màn hình chia nhỏ sẽ tắt khi những người khác đã rời khỏi (menu tạm dừng của họ).",
"horizon.splitscreen.setup.window_place": "Cửa sổ %s (%s trong số %s)",
"horizon.splitscreen.setup.names": "Tên",
"horizon.splitscreen.setup.identify": "Xác định",
"horizon.splitscreen.setup.layout.two": "2 chia sẻ: %s",
"horizon.splitscreen.setup.layout.three": "3 chia sẻ: %s",
"horizon.splitscreen.setup.layout.two.0": "Tự động",
"horizon.splitscreen.setup.layout.two.1": "Bên cạnh nhau",
"horizon.splitscreen.setup.layout.two.2": "Trên và dưới",
"horizon.splitscreen.setup.layout.three.0": "Một rộng trên đầu",
"horizon.splitscreen.setup.layout.three.1": "Một người cao bên trái",
"horizon.splitscreen.setup.layout.three.2": "Bên cạnh nhau",
"horizon.splitscreen.setup.help.player": "Nhấp hoặc kéo %s để di chuyển chúng.",
"horizon.splitscreen.setup.help.layout_auto": "%s (cạnh nhau khi cửa sổ rộng). Nhấn để thay đổi.",
"horizon.splitscreen.setup.help.layout": "%s. Nhấn để thay đổi.",
"horizon.splitscreen.setup.help.switch": "Chia màn hình cho máy tính này, bật hoặc tắt.",
"horizon.splitscreen.setup.help.identify": "Chế độ xem của mỗi người chơi hiển thị cửa sổ đó.",
"horizon.splitscreen.setup.help.names": "Tên của mỗi người chơi ở góc nhìn của họ.",
"horizon.splitscreen.setup.help.revert": "Hoàn tác những thay đổi chưa được áp dụng.",
"horizon.splitscreen.setup.help.apply": "Chơi theo cách bản đồ hiển thị.",
"horizon.splitscreen.setup.help.unchanged": "Vẫn chưa có gì thay đổi.",
"horizon.splitscreen.setup.give_up_pad": "Bỏ cuộc",
"horizon.splitscreen.prompt.controller_connected": "Đã kết nối bộ điều khiển",
"horizon.splitscreen.prompt.controller_disconnected": "Bộ điều khiển bị ngắt kết nối",
"horizon.splitscreen.prompt.controller_disconnected.hint": "Kết nối lại hoặc nhấn nút trên thiết bị khác",
"horizon.splitscreen.prompt.join.one": "%s muốn tham gia",
"horizon.splitscreen.prompt.join.many": "%s người điều khiển muốn tham gia",
"horizon.splitscreen.prompt.join.yes": "Tham gia",
"horizon.splitscreen.prompt.join.as_p1": "Chơi như P1",
"horizon.splitscreen.prompt.join.no": "Không",
"horizon.splitscreen.prompt.lost": "%s: bộ điều khiển bị ngắt kết nối",
"horizon.splitscreen.prompt.lost.use_another": "Sử dụng cái khác",
"horizon.splitscreen.prompt.lost.leave": "Rời khỏi",
"horizon.splitscreen.setup.help.give_up_pad": "Bộ điều khiển của bạn ngừng điều khiển bạn và được đề nghị tham gia (A).",
"horizon.splitscreen.setup.note.held_at": "%s đến %s: A thả ở đây, B đặt lại.",
"horizon.splitscreen.setup.note.held": "%s nhặt lên: trái/phải nhặt ở đâu, A đánh rơi, B đặt lại.",
"Hides models behind opaque blocks. Async checks off-thread; entities tick.": "Ẩn các mô hình đằng sau các khối mờ đục. Async kiểm tra ngoài luồng; thực thể đánh dấu.",
"Block Entities": "Khối thực thể",
"Shulker Boxes": "Hộp Shulker",
"Reuses settled boxes; lid movement stays animated.": "Tái sử dụng các hộp đã được giải quyết; chuyển động của nắp vẫn hoạt hình.",
"Signs": "Dấu hiệu",
"Reuses sign text until text, light, or font changes.": "Tái sử dụng văn bản ký tên cho đến khi văn bản, ánh sáng hoặc phông chữ thay đổi.",
"Decorated Pots": "Chậu trang trí",
"Reuses still pots; break wobble and sherd changes redraw.": "Tái sử dụng chậu; phá vỡ sự lung lay và thay đổi mảnh ghép vẽ lại.",
"Bells": "chuông",
"Reuses still bells; ringing stays animated.": "Tái sử dụng vẫn chuông; chuông vẫn hoạt hình.",
"Chests": "Rương",
"Reuses closed chests; moving lids stay animated.": "Tái sử dụng các rương đã đóng; nắp di chuyển vẫn hoạt hình.",
"Banners": "Biểu ngữ",
"Reuses poles; flags and pattern layers still update.": "Tái sử dụng cột; cờ và các lớp mẫu vẫn cập nhật.",
"Copper Golem Statues": "Tượng Golem bằng đồng",
"Reuses statue geometry until its block state changes.": "Tái sử dụng hình học của bức tượng cho đến khi trạng thái khối của nó thay đổi.",
"Leaf Culling": "Loại bỏ lá",
"Every leaf face. Vanilla's fancy leaves.": "Mỗi mặt lá. Những chiếc lá lạ mắt của vani.",
"Distant Plant Dither": "Hòa sắc thực vật xa xôi",
"Keeps fine plants in high-res packs from fading far away.": "Giữ cho những cây đẹp trong gói có độ phân giải cao không bị phai màu ở xa.",
"Screenshot Quality": "Chất lượng ảnh chụp màn hình",
"F2 screenshots at this many times the game's resolution. Higher takes longer.": "Ảnh chụp màn hình F2 lúc này gấp nhiều lần độ phân giải của trò chơi. Cao hơn mất nhiều thời gian hơn.",
"Frame Generation": "Tạo khung",
"Shows a made-up frame between each two real ones: smoother, a little more lag.": "Hiển thị khung hình tạo sẵn giữa hai khung hình thực: mượt mà hơn, độ trễ hơn một chút.",
"Shadow Cache": "Bộ nhớ đệm bóng tối",
"Reuses the pack shadow map when sun, view and world match. Off by default.": "Tái sử dụng bản đồ bóng gói khi mặt trời, chế độ xem và thế giới khớp với nhau. Tắt theo mặc định.",
"Find BlueMap": "Tìm BlueMap",
"On servers, finds their BlueMap web map for far terrain. Next join.": "Trên máy chủ, tìm bản đồ web BlueMap của họ cho địa hình xa. Tiếp theo tham gia.",
"BlueMap Radius": "Bán kính BlueMap",
"How far around you BlueMap tiles are downloaded. Next join.": "Khoảng cách xung quanh bạn các ô BlueMap được tải xuống. Tiếp theo tham gia.",
"Synchronous": "Đồng bộ",
"Asynchronous": "Không đồng bộ",
"Solid": "chất rắn",
"Solid Aggressive": "Rắn hung hăng",
"Hollow": "Rỗng",
"Leaves fully inside a canopy draw solid: fewer see-through layers.": "Lá hoàn toàn bên trong tán cây có khả năng kéo chắc chắn: ít lớp nhìn xuyên qua hơn.",
"Leaves with one open side draw solid too: faster, chunkier edges.": "Những chiếc lá có một mặt mở cũng vẽ chắc chắn: các mép lá nhanh hơn, dày hơn.",
"Drops faces between leaves: faster, but gaps look through.": "Thả mặt giữa các lá: nhanh hơn, nhưng có khoảng trống nhìn xuyên qua.",
"Hotbar: Previous Slot": "Hotbar: Khe cắm trước đó",
"Hotbar: Next Slot": "Thanh nóng: Khe tiếp theo",
"horizon.agent.connected.one": "Đã kết nối: 1 kết nối đại lý",
"horizon.agent.connected.many": "Đã kết nối: %s kết nối đại lý",
"horizon.agent.connected.one_ago": "Đã kết nối: 1 kết nối tác nhân, lệnh cuối cùng %s s trước",
"horizon.agent.connected.many_ago": "Đã kết nối: %s kết nối đại lý, lệnh cuối cùng %s s trước",
"horizon.agent.waiting": "Đang chờ đại lý.",
"horizon.agent.off": "Tắt: đại lý không thể truy cập trò chơi này.",
"horizon.agent.session_opened": "Được mở cho phiên này bởi chương trình đã bắt đầu trò chơi.",
"horizon.agent.socket": "Ổ cắm: %s (sao chép chi tiết đường dẫn đầy đủ của nó)",
"horizon.agent.local_only": "Chỉ cục bộ: các đại lý trên máy tính này, không bao giờ trên mạng.",
"%s nits": "%s trứng chí",
"Auto (%s nits)": "Tự động (%s nits)",
"%.2f nits": "%.2f trứng chí",
"Hides models behind opaque blocks. Entities update. Off with custom packs.": "Ẩn các mô hình đằng sau các khối mờ đục. Cập nhật thực thể. Tắt với các gói tùy chỉnh.",
"horizon.extras.repro_keys": "Phím tắt ghi âm",
"horizon.extras.repro_keys.tooltip": "F3+R bắt đầu hoặc dừng ghi lại và F3+E ghi gói của nó. Tắt theo mặc định: bản ghi sẽ sao chép thế giới.",
"horizon.agent.record_session": "Bắt đầu phiên ghi âm",
"horizon.agent.record_stop": "Dừng ghi phiên",
"horizon.agent.export_repro": "Xuất gói Repro",
"horizon.repro.started": "Quá trình ghi bắt đầu; F3+R dừng nó và ghi gói.",
"horizon.repro.stopped": "Đã dừng ghi: %s",
"horizon.repro.bundle": "Gói tái bản: %s",
"horizon.repro.error": "Đại diện: %s",
"horizon.repro.no_recording": "Chưa có bản ghi nào để xuất.",
"horizon.repro.replay_started": "Đã bắt đầu phát lại: %s",
"horizon.pack.addInfo": "Thêm gói tài nguyên từ Modrinth",
"horizon.pack.addWorking": "Hỏi Modrinth...",
"horizon.pack.addNone": "Không tìm thấy gói tài nguyên nào",
"horizon.pack.addTitle": "Thêm gói tài nguyên",
"horizon.pack.install": "cài đặt",
"horizon.pack.installing": "Đang cài đặt",
"horizon.pack.installed": "Đã cài đặt",
"horizon.pack.search": "Tìm kiếm",
"horizon.pack.searchHint": "Tìm kiếm Modrinth...",
"horizon.pack.filters": "Bộ lọc",
"horizon.pack.filter.realistic": "thực tế",
"horizon.pack.filter.simplistic": "đơn giản",
"horizon.pack.filter.vanillaLike": "Giống vani",
"horizon.pack.addFailed": "Không thể thêm gói: %s",
"horizon.extras.header.cosmetics": "Mỹ phẩm",
"horizon.extras.cosmetics_mine": "Mỹ phẩm của tôi",
"horizon.extras.cosmetics_mine.tooltip": "Ẩn: mọi người chơi Horizon đều nhìn thấy bạn mà không có mỹ phẩm, bao gồm cả bạn. Công tắc tương tự như Tủ quần áo của bệ phóng.",
"horizon.extras.cosmetics_others": "Mỹ phẩm của người chơi khác",
"horizon.extras.cosmetics_others.tooltip": "Những gì người chơi Horizon khác mặc: mọi thứ, chỉ kiểu thẻ tên của họ hoặc không có gì. Ẩn, trò chơi không bao giờ hỏi họ mặc gì.",
"horizon.extras.cosmetics_auras": "Hào quang và dấu vết của người khác",
"horizon.extras.cosmetics_auras.tooltip": "Hào quang và đường mòn mà người chơi khác mặc. Tắt theo mặc định.",
"horizon.extras.cosmetics.shown": "Đã hiển thị",
"horizon.extras.cosmetics.hidden": "Ẩn",
"horizon.extras.cosmetics.name_tags": "Chỉ gắn thẻ tên"
}
@@ -354,5 +354,9 @@
"horizon.agent.off": "关闭:代理无法访问此游戏。",
"horizon.agent.session_opened": "由启动游戏的程序为本次会话开启。",
"horizon.agent.socket": "套接字:%s(复制详细信息以获取完整路径)",
"horizon.agent.local_only": "仅限本机:此电脑上的代理可用,网络不可用。"
"horizon.agent.local_only": "仅限本机:此电脑上的代理可用,网络不可用。",
"Particle Culling": "粒子剔除",
"Draws every particle.": "绘制所有粒子。",
"Skips offscreen, subpixel and terrain-hidden particles.": "跳过屏幕外、小于一个像素和被地形遮挡的粒子。",
"Skips offscreen, subpixel and terrain-hidden particles with less render-thread work.": "跳过屏幕外、小于一个像素和被地形遮挡的粒子,减少渲染线程的工作量。"
}
@@ -1146,6 +1146,7 @@ pub fn main() -> horizon_client::Result<()> {
sleeping: false,
sleep_timer: 0,
passenger: false,
riding_vehicle: None,
vehicle: None,
}
});
@@ -1174,6 +1175,7 @@ pub fn main() -> horizon_client::Result<()> {
collision: &collision,
data: &data,
player: player.clone(),
controlling_player_movement: None,
nearest_player: player.as_ref().filter(|p| !p.spectator).map(|p| p.position),
others: $snapshot,
dragon: None,
@@ -454,6 +454,9 @@ pub const COMMANDS: &[Cmd] = &[
cmd!("bench", Scripting, "bench SECONDS", "reset frame stats, wait, reply with the summary", "", ["horizon-ctl bench 10"], &[p("seconds", Ty::Num, "how long to measure")], mcp: true, local: false),
cmd!("stats", Scripting, "stats [reset] [raw]", "frame-time summary since the last reset", "", ["horizon-ctl stats"], &[opt("reset", Ty::Bool, "start counting again"), opt("raw", Ty::Bool, "every frame time too (frame_ms, cpu_ms, gpu_ms)")], mcp: true, local: false),
cmd!("gpu-passes", Scripting, "gpu-passes [on|off]", "time Horizon's own render passes on the GPU, shown in F3 and in stats and bench", "", ["horizon-ctl gpu-passes on"], &[opt("mode", Ty::Enum(&["on", "off"]), "on or off; without it, only reports")], mcp: false, local: false),
cmd!("render-capture", Scripting, "render-capture on|off|DIR", "keep CPU copies of the meshes the renderer draws (on), or write the next frame's scene to DIR for the scene_replay example",
"on meshes every section and far tile again so the copies are complete (HORIZON_RENDER_CAPTURE=1 keeps them from the start). DIR gets the camera, frame inputs, settings and every resident near section and far tile mesh; entities, particles, weather, the hand and the HUD are left out. See docs/graphics.md.",
["horizon-ctl render-capture on", "horizon-ctl render-capture /tmp/scene"], &[], mcp: false, local: false),
cmd!("fly", Scripting, "fly X1 Y1 Z1 X2 Y2 Z2 SECONDS [PITCH [raw]]", "fly the camera along a line, then reply with the frame summary",
"The reply's tick_ms and tick_ms_max are the world's smoothed tick time over the flight (the server thread's when single player runs on one). With raw, the reply also lists every frame time in milliseconds (frame_ms).",
["horizon-ctl fly 0 100 0 500 100 0 20"], &[], mcp: false, local: false),
@@ -484,7 +487,7 @@ pub fn find(name: &str) -> Option<&'static Cmd> {
pub fn overview() -> String {
let mut out = String::from(
"horizon-ctl: play and script a running Horizon from the command line.\n\n\
usage: horizon-ctl [--socket PATH] [--timeout SECONDS] [--pretty] COMMAND [ARGS...]\n\
usage: horizon-ctl [--socket PATH] [--timeout SECONDS] [--api LINE] [--pretty] COMMAND [ARGS...]\n\
\x20 horizon-ctl COMMAND --help (or: horizon-ctl help COMMAND)\n",
);
for group in Group::ALL {
@@ -496,7 +499,8 @@ pub fn overview() -> String {
out.push_str(
"\nEvery reply is one JSON line. Errors are {\"error\": \"...\"}; the exit status is 0 on\n\
success, 1 when the game replied with an error, 2 for a usage error, 3 when the\n\
game cannot be reached or started and 4 while No AI is on (the launcher's settings).\n\
game cannot be reached or started, 4 while No AI is on (the launcher's settings) and 5 when\n\
--api LINE (such as --api 0.1) names a protocol line the game's hello does not report.\n\
Actions (goto, break, place...) block until done.\n\
horizon-ctl help --game lists the running game's own commands, test hooks included.\n\
The socket is $HORIZON_CONTROL, else $XDG_RUNTIME_DIR/horizon-control.sock (on Windows\n\
@@ -23,6 +23,8 @@ const USAGE: u8 = 2;
const UNREACHABLE: u8 = 3;
/// No AI is on (`horizon_core::no_ai`): agent control is off.
const DENIED: u8 = 4;
/// `--api LINE`: the game speaks another protocol line.
const API_MISMATCH: u8 = 5;
/// A failure, with the exit status it maps to.
#[derive(Debug)]
@@ -104,12 +106,41 @@ impl Client {
}
}
/// Whether a game's protocol (`MAJOR.MINOR.PATCH`) is on the requested line (`MAJOR.MINOR`, or a full version):
/// every part the line names must match. Before 1.0 a patch only adds, so `0.1` takes `0.1.0` and `0.1.4`.
fn on_line(protocol: &str, line: &str) -> bool {
let game: Vec<&str> = protocol.split('.').collect();
let want: Vec<&str> = line.split('.').collect();
want.len() <= game.len() && want.iter().zip(&game).all(|(w, g)| w == g)
}
/// Ask the game `hello` and refuse it unless it speaks `line`. A game without the command
/// (older than protocol 0.1.0) has no protocol line and is refused too.
fn check_api(client: &mut Client, line: &str) -> Result<(), Failure> {
let refuse = |why: String| Failure {
reply: json!({ "error": format!("horizon-ctl --api {line}: {why}"), "kind": "api", "wanted": line }),
status: API_MISMATCH,
};
let reply = client.send("hello")?;
match reply.get("protocol").and_then(Value::as_str) {
Some(p) if on_line(p, line) => Ok(()),
Some(p) => Err(refuse(format!(
"the game speaks control protocol {p}, not the {line} line; use a horizon-ctl built for it (docs/api/agent-control.md)"
))),
None => Err(refuse(
"the game does not report a control protocol (it predates hello); update the game or drop --api".to_owned(),
)),
}
}
/// Global options and the connection, opened on first use.
pub struct Session {
pub socket: PathBuf,
pub timeout: Option<Duration>,
/// The game's home, where No AI is read (`horizon_core::no_ai`).
pub home: PathBuf,
/// `--api LINE`: the protocol line this run speaks; a game on another line is refused.
pub api: Option<String>,
client: Option<Client>,
}
@@ -119,6 +150,7 @@ impl Session {
socket,
timeout,
home: horizon_client::logging::game_home(),
api: None,
client: None,
}
}
@@ -128,7 +160,11 @@ impl Session {
}
fn client(&mut self) -> Result<&mut Client, Failure> {
if self.client.is_none() {
self.client = Some(Client::connect(&self.socket, self.timeout)?);
let mut client = Client::connect(&self.socket, self.timeout)?;
if let Some(line) = &self.api {
check_api(&mut client, line)?;
}
self.client = Some(client);
}
Ok(self.client.as_mut().unwrap())
}
@@ -428,6 +464,7 @@ fn main() -> ExitCode {
let mut socket = horizon_client::control::default_path();
let mut timeout = None;
let mut pretty = false;
let mut api: Option<String> = None;
// Global options before the command.
loop {
match args.first().map(String::as_str) {
@@ -446,6 +483,10 @@ fn main() -> ExitCode {
timeout = Some(Duration::from_secs_f64(s.max(0.001)));
args.drain(0..2);
}
Some("--api") if args.len() >= 2 => {
api = Some(args[1].clone());
args.drain(0..2);
}
Some("--pretty") => {
pretty = true;
args.remove(0);
@@ -453,7 +494,22 @@ fn main() -> ExitCode {
_ => break,
}
}
if let Some(line) = &api {
let valid = !line.is_empty()
&& line.split('.').count() <= 3
&& line
.split('.')
.all(|p| !p.is_empty() && p.bytes().all(|b| b.is_ascii_digit()));
if !valid {
print(
&json!({ "error": "--api takes a protocol line such as 0.1", "kind": "usage" }),
false,
);
return ExitCode::from(USAGE);
}
}
let mut session = Session::new(socket, timeout);
session.api = api;
let name = args.first().cloned();
let status = match name.as_deref() {
None | Some("-h" | "--help") => {
@@ -622,6 +678,118 @@ mod tests {
assert!(split_line("type \"open").is_err());
}
/// A fake game on a Unix socket: answers every line with `reply`, records the lines it got.
#[cfg(unix)]
fn fake_game(
name: &str,
reply: &'static str,
) -> (PathBuf, std::thread::JoinHandle<Vec<String>>) {
let path = std::env::temp_dir().join(format!("hctl-{name}-{}.sock", std::process::id()));
let _ = std::fs::remove_file(&path);
let listener = std::os::unix::net::UnixListener::bind(&path).unwrap();
let handle = std::thread::spawn(move || {
let (stream, _) = listener.accept().unwrap();
let mut lines = Vec::new();
let mut reader = BufReader::new(stream.try_clone().unwrap());
let mut out = stream;
let mut line = String::new();
while reader.read_line(&mut line).unwrap_or(0) > 0 {
lines.push(line.trim_end().to_owned());
line.clear();
writeln!(out, "{reply}").unwrap();
}
lines
});
(path, handle)
}
#[cfg(unix)]
fn api_session(path: &Path, api: &str) -> Session {
let mut s = Session::new(path.to_owned(), Some(Duration::from_secs(5)));
s.home = std::env::temp_dir().join("horizon-ctl-api-no-home");
s.api = Some(api.to_owned());
s
}
#[test]
fn api_line_matches_whole_parts() {
assert!(on_line("0.1.0", "0.1"));
assert!(on_line("0.1.4", "0.1"));
assert!(on_line("0.1.0", "0.1.0"));
assert!(!on_line("0.1.0", "0.1.1"));
assert!(!on_line("0.2.0", "0.1"));
assert!(!on_line("0.10.0", "0.1"));
assert!(!on_line("1.0.0", "0"));
assert!(!on_line("0.1", "0.1.0"));
}
#[cfg(unix)]
#[test]
fn api_accepts_a_game_on_the_line() {
let (path, game) = fake_game(
"match",
r#"{"protocol":"0.1.0","release":"x","features":[]}"#,
);
let mut s = api_session(&path, "0.1");
let reply = s.game("hello").unwrap();
assert_eq!(reply["protocol"], "0.1.0");
drop(s);
// hello for the check, then the caller's own line.
assert_eq!(game.join().unwrap(), ["hello", "hello"]);
let _ = std::fs::remove_file(path);
}
#[cfg(unix)]
#[test]
fn api_refuses_a_game_on_another_line() {
let (path, game) = fake_game(
"mismatch",
r#"{"protocol":"0.2.0","release":"x","features":[]}"#,
);
let mut s = api_session(&path, "0.1");
let f = s.game("state").unwrap_err();
assert_eq!(f.status, API_MISMATCH);
assert_eq!(f.reply["kind"], "api");
let message = f.reply["error"].as_str().unwrap();
assert!(
message.contains("0.2.0") && message.contains("0.1"),
"{message}"
);
drop(s);
// The refused command never reached the game.
assert_eq!(game.join().unwrap(), ["hello"]);
let _ = std::fs::remove_file(path);
}
#[cfg(unix)]
#[test]
fn api_refuses_a_game_with_no_protocol_line() {
let (path, game) = fake_game("old", r#"{"error":"unknown command hello"}"#);
let mut s = api_session(&path, "0.1");
let f = s.game("state").unwrap_err();
assert_eq!(f.status, API_MISMATCH);
assert!(
f.reply["error"]
.as_str()
.unwrap()
.contains("predates hello")
);
drop(s);
assert_eq!(game.join().unwrap(), ["hello"]);
let _ = std::fs::remove_file(path);
}
#[cfg(unix)]
#[test]
fn without_api_the_game_is_not_asked_hello() {
let (path, game) = fake_game("noapi", r#"{"ok":true}"#);
let mut s = Session::new(path.clone(), Some(Duration::from_secs(5)));
s.game("state").unwrap();
drop(s);
assert_eq!(game.join().unwrap(), ["state"]);
let _ = std::fs::remove_file(path);
}
#[test]
fn unreachable_games_fail_with_status_3() {
let home =
+1
View File
@@ -7,6 +7,7 @@ pub mod ambience;
pub mod animate_tick;
pub mod arrows;
pub mod block_contact;
pub mod powder_snow;
pub use horizon_client_render::{
assets, atlas_sources, audio, auth, ban_notice, bidi, biome, block_edit, block_entities,
block_entity_anim, block_entity_render, block_sprites, bluemap, bluemap_detect, border_render,
+43 -9
View File
@@ -79,7 +79,8 @@ impl Base<'_> {
}
if let Tag::Compound(map) = &mut tag {
for (key, value) in [
("Fire", Tag::Short(-1)),
// Entity.remainingFireTicks starts at 0 (-1 was the old default).
("Fire", Tag::Short(0)),
("Air", Tag::Short(300)),
("Invulnerable", Tag::Byte(0)),
("PortalCooldown", Tag::Int(0)),
@@ -1139,15 +1140,14 @@ pub fn mob_to_nbt(
// Zombie and Piglin.setBaby (even for an adult) the speed, Rabbit.setVariant
// the attack damage.
use crate::mobs::finalize::Attr;
let made = if crate::mobs::doors::is_zombie(species) || species == crate::mobs::Species::Piglin
{
Some(Attr::MovementSpeed)
} else if species == crate::mobs::Species::Rabbit {
Some(Attr::AttackDamage)
// Every other living entity's first tick makes the movement_speed instance
// (LivingEntity.removeFrost reads it through getAttribute).
let made = if species == crate::mobs::Species::Rabbit {
vec![Attr::MovementSpeed, Attr::AttackDamage]
} else {
None
vec![Attr::MovementSpeed]
};
if let Some(attr) = made {
for attr in made {
let base = crate::mobs::finalize::base_value(m, attr);
let mut list = match map.get(&"attributes".into()) {
Some(Tag::List(l)) => l.clone(),
@@ -3194,7 +3194,15 @@ pub fn armor_stand_to_nbt(a: &ArmorStand, uuid: [i32; 4], raw: Option<&Tag>) ->
("AbsorptionAmount", Tag::Float(0)),
("FallFlying", Tag::Byte(0)),
("current_impulse_context_reset_grace_time", Tag::Int(0)),
("attributes", Tag::List(Vec::new())),
// AttributeMap.pack: the movement_speed instance every living
// entity's first tick makes (removeFrost), at the registry default.
(
"attributes",
Tag::List(vec![Tag::compound([
("id", string("minecraft:movement_speed")),
("base", Tag::Double(0.7f64.to_bits())),
])]),
),
(
"Brain",
Tag::compound([("memories", Tag::Compound(Compound::new()))]),
@@ -4133,6 +4141,32 @@ mod tests {
assert_eq!(number(tag.get("Health")), Some(5));
}
#[test]
fn entities_without_fire_save_zero_and_a_mob_saves_its_speed_instance() {
// Entity.remainingFireTicks starts at 0; LivingEntity.removeFrost makes
// the movement_speed instance AttributeMap.pack then saves.
let orb = ExperienceOrb {
join: Default::default(),
no_gravity: false,
id: 0,
position: Vec3::ZERO,
previous: Vec3::ZERO,
velocity: Vec3::ZERO,
value: 1,
age: 0,
on_ground: false,
count: 1,
ticks: 0,
health: 5,
};
let tag = orb_to_nbt(&orb, [0; 4]);
assert_eq!(tag.get("Fire"), Some(&Tag::Short(0)));
let stand = armor_stand_to_nbt(&ArmorStand::new(1, Vec3::ZERO, 0.0), [0; 4], None);
let Some(Tag::List(attrs)) = stand.get("attributes") else {
panic!("no attributes");
};
assert_eq!(attrs.len(), 1);
}
#[test]
fn orbs_keep_their_count() {
let o = ExperienceOrb {
join: Default::default(),
+10
View File
@@ -109,6 +109,16 @@ pub fn main_with(mods: crate::mod_api::Mods) {
max_stack,
);
},
player_chat: |player, name, message, replies, cancel| {
crate::mod_api::dispatch_player_chat(
crate::mod_api::mods(),
player,
name,
message,
replies,
cancel,
);
},
living_heal: |entity, amount, cancel| {
crate::mod_api::dispatch_living_heal(crate::mod_api::mods(), entity, amount, cancel);
},
+226 -99
View File
@@ -246,11 +246,13 @@ mod nether_portal;
mod no_resources;
mod ominous_item_spawner;
mod options;
mod ordered_tick;
mod packs;
mod pad;
mod pad_menu;
mod paintings;
mod pandas;
mod particle_culling;
mod passengers;
mod persist;
mod perspective;
@@ -2685,6 +2687,7 @@ struct Game<'a> {
experience: Experience,
orbs: horizon_client::join_seq::JoinList<ExperienceOrb>,
xp_delay: u32,
ordered: ordered_tick::OrderedTicks,
last_level_up: u64,
/// The arm swing (`LivingEntity.SwingState`) and how many swings started.
swing: horizon_client::first_person::SwingState,
@@ -2906,6 +2909,8 @@ struct Game<'a> {
perf: horizon_client::telemetry::Session,
/// Control replies waiting for a rendered frame or a benchmark deadline.
pending_screenshot: Option<std::sync::mpsc::Sender<String>>,
/// `render-capture DIR`: replied once the renderer wrote the scene.
pending_render_capture: Option<std::sync::mpsc::Sender<String>>,
pending_bench: Option<(Instant, std::sync::mpsc::Sender<String>)>,
/// Recent frame times for the performance overlay.
frame_graph: horizon_client::perf_overlay::FrameGraph,
@@ -2936,6 +2941,7 @@ struct Game<'a> {
entity_culler: Option<horizon_client::entity_culling::Culler>,
async_entity_culler: Option<entity_culling::AsyncCuller>,
async_entity_culling_failed: bool,
async_particle_culler: RefCell<particle_culling::ParticleAsyncState>,
/// `Renderer::pack_shadow_casters` for this frame's entities: (keep what the culler hides,
/// build the player's model in first person); (false, false) without a shader pack.
pack_shadow_casters: (bool, bool),
@@ -3208,6 +3214,18 @@ impl Dim {
}
}
}
fn death_drops(
inventory: &mut [Option<ItemStack>],
offhand: &mut Option<ItemStack>,
armor: &mut [Option<ItemStack>],
) -> Vec<ItemStack> {
let mut stacks: Vec<ItemStack> = inventory.iter_mut().filter_map(Option::take).collect();
stacks.extend(offhand.take());
stacks.extend(armor.iter_mut().rev().filter_map(Option::take));
stacks.retain(|s| s.enchantment_level("minecraft:vanishing_curse") == 0);
stacks
}
/// `Inventory.add` on a player's 36 slots (hotbar first) and off hand,
/// `max` the stack's own maximum: onto equal stacks first
/// (`getSlotWithRemainingSpace`: the selected slot, the off hand, then the
@@ -3307,6 +3325,11 @@ fn gliding_pieces(items: &Items, armor: &[Option<ItemStack>; 4]) -> [bool; 4] {
.is_some_and(|s| horizon_client::item_sync::can_glide_using(s, SLOTS[i], items))
})
}
/// `Level.canHaveWeather`: sky light, no ceiling, and not the End (the one
/// level the rule names by id).
fn level_can_have_weather(sky_light: bool, has_ceiling: bool, is_end: bool) -> bool {
sky_light && !has_ceiling && !is_end
}
/// `Camera.setRotation` (`rotationYXZ(π - yaw, -pitch, 0)`) for the player's
/// view, turned round in third-person front view (`Camera.setup`).
fn camera_rotation(camera_type: perspective::CameraType, yaw: f32, pitch: f32) -> glam::Quat {
@@ -3323,6 +3346,25 @@ fn camera_rotation(camera_type: perspective::CameraType, yaw: f32, pitch: f32) -
)
}
impl Game<'_> {
/// `Level.canHaveWeather`, from the level's dimension type (sky light, no
/// ceiling) and the End, which vanilla names by id. Every rain, thunder
/// and lightning rule asks this, never the dimension's id.
fn can_have_weather(&self) -> bool {
level_can_have_weather(
self.world.shape.sky_light,
self.world.shape.has_ceiling,
self.dim == Dim::End,
)
}
/// The rain and thunder levels (`Level.getRainLevel`, `getThunderLevel`):
/// the world's, where the level can have weather, else none.
fn weather_levels(&self, partial: f32) -> (f32, f32) {
if self.can_have_weather() {
self.world.weather.levels(partial)
} else {
(0.0, 0.0)
}
}
fn eye_position(&self) -> Option<[f64; 3]> {
let p = self.player.as_ref()?;
Some([
@@ -3890,11 +3932,7 @@ impl Game<'_> {
if self.ui.rules.bool("keep_inventory") {
return;
}
let mut stacks: Vec<ItemStack> =
self.inventory.iter_mut().filter_map(Option::take).collect();
stacks.extend(self.armor.iter_mut().rev().filter_map(Option::take));
stacks.extend(self.offhand.take());
stacks.retain(|s| s.enchantment_level("minecraft:vanishing_curse") == 0);
let stacks = death_drops(&mut self.inventory, &mut self.offhand, &mut self.armor);
self.apply_equipment();
for stack in stacks {
let r = &mut self.world.random;
@@ -4194,6 +4232,15 @@ impl Game<'_> {
&nearby,
Some(self.border.geometry()),
);
if merging && !no_physics {
self.entity_powder_snow_particles(
item.previous,
item.position,
item.bounds(),
item.velocity,
false,
);
}
cells.moved(i, item.previous, item.position);
// Entity.handleOnAboveBubbleColumn: the server sends the particles of
// the surface of a bubble column the item is at the top of.
@@ -4390,7 +4437,7 @@ impl Game<'_> {
f: impl FnOnce(&Behaviours, &mut GameLevel<'_>, &mut Ticks) -> R,
) -> R {
let darken = self.sky_darken();
let (rain, thunder) = self.world.weather.levels(1.0);
let (rain, thunder) = self.weather_levels(1.0);
// Spectators ignore block triggers (Entity.isIgnoringBlockTriggers).
let spectator = self.spectator();
let player_box = self.player.as_ref().filter(|_| !spectator).map(|p| {
@@ -5727,38 +5774,22 @@ impl Game<'_> {
self.right = false;
}
/// FallingBlockEntity.tick: fall with 0.04 gravity and 0.98 drag, then land.
fn tick_falling(&mut self) -> Result<()> {
let falling = std::mem::take(&mut self.falling);
let mut kept = Vec::with_capacity(falling.len());
let mut collision_error = None;
/// One falling block's `tick`: places or drops its block in its own tick,
/// so a block falling onto one that just landed lands on top of it. `i` is
/// its place in the list; the caller has checked it is ticking.
fn tick_one_falling(&mut self, i: usize) -> Result<()> {
let entity_drops = self.ui.rules.bool("entity_drops");
// ServerLevel.tick: only entities in entity-ticking chunks tick.
let ticking = self.entity_ticking_area();
// FallingBlockEntity.tick places or drops each block in its own tick,
// so a block falling onto one that just landed lands on top of it.
for mut f in falling {
if !ticking(f.position.x.floor() as i32, f.position.z.floor() as i32) {
kept.push(f);
continue;
let mut f = self.falling.remove(i);
let original = f.clone();
match self.fall_step(&mut f, entity_drops) {
Ok(FallStep::Falling) => self.falling.insert(i.min(self.falling.len()), f),
Ok(FallStep::Gone) => {}
Ok(FallStep::Dropped(at)) => self.drop_falling_block(f.state, at),
Ok(FallStep::Landed(pos)) => self.finish_falling_block(f, pos),
Err(error) => {
self.falling.insert(i.min(self.falling.len()), original);
return Err(error);
}
let original = f.clone();
match self.fall_step(&mut f, entity_drops) {
Ok(FallStep::Falling) => kept.push(f),
Ok(FallStep::Gone) => {}
Ok(FallStep::Dropped(at)) => self.drop_falling_block(f.state, at),
Ok(FallStep::Landed(pos)) => self.finish_falling_block(f, pos),
Err(error) => {
kept.push(original);
collision_error.get_or_insert(error);
}
}
}
// Blocks that started falling meanwhile tick from the next tick on.
let started = std::mem::replace(&mut self.falling, kept.into());
self.falling.extend(started);
self.process_level_events()?;
if let Some(error) = collision_error {
return Err(error);
}
Ok(())
}
@@ -5871,6 +5902,13 @@ impl Game<'_> {
for pos in tops {
self.bubble_column_particles(pos);
}
self.entity_powder_snow_particles(
from,
f.position,
horizon_client::falling_block::bounds(f.position),
f.velocity,
false,
);
// FallingBlockEntity.tick handles its portal after the move's block
// effects, before placing/dropping on the floor under an End portal.
let teleported = self.falling_through_portal(f);
@@ -7587,9 +7625,11 @@ impl Game<'_> {
self.native_joins_flush(false, 0);
self.lan_mark_synced();
}
self.begin_ordered_ticks();
if running {
horizon_client::spans::time("tick_paintings", || self.tick_paintings());
horizon_client::spans::time("tick_item_frames", || self.tick_item_frames());
self.ordered_before(ordered_tick::Batch::ArmorStands)?;
horizon_client::spans::time("tick_armor_stands", || self.tick_armor_stands())?;
horizon_client::spans::time("tick_cushions", || self.tick_cushions());
// ServerLevel.tick: the arrivals of this server tick are in the level
@@ -7597,7 +7637,9 @@ impl Game<'_> {
// own tick opens.
self.land_portal_arrivals();
self.handle_vehicle_portals();
self.ordered_before(ordered_tick::Batch::Boats)?;
horizon_client::spans::time("tick_boats", || self.tick_boats());
self.ordered_before(ordered_tick::Batch::Carts)?;
horizon_client::spans::time("tick_carts", || self.tick_carts());
self.tick_vehicle_watch();
let from = self.lan_synced_from();
@@ -7608,7 +7650,9 @@ impl Game<'_> {
self.tick_lodestone_compasses();
horizon_client::spans::time("tick_bolts", || self.tick_bolts());
horizon_client::spans::time("tick_fishing", || self.tick_fishing());
self.ordered_before(ordered_tick::Batch::Tridents)?;
horizon_client::spans::time("tick_tridents", || self.tick_tridents());
self.ordered_before(ordered_tick::Batch::Rockets)?;
horizon_client::spans::time("tick_rockets", || self.tick_rockets());
horizon_client::spans::time("tick_ominous_item_spawners", || {
self.tick_ominous_item_spawners()
@@ -7619,6 +7663,7 @@ impl Game<'_> {
self.handle_entity_portals();
self.handle_end_gateway_portals();
});
self.ordered_before(ordered_tick::Batch::Items)?;
horizon_client::spans::time("tick_items", || self.tick_items());
if self.remote.is_none() {
self.hoppers_catch_items();
@@ -7632,11 +7677,14 @@ impl Game<'_> {
// The ride the player's file names, once the vehicle is in the world.
self.restore_root_vehicle();
if running {
self.ordered_before(ordered_tick::Batch::Mobs)?;
horizon_client::spans::time("tick_mobs", || self.tick_mobs())?;
// Dead, despawned or gone into a hive.
self.native_leaves_flush();
horizon_client::spans::time("recheck_golem_openers", || self.recheck_golem_openers());
self.tick_mod_container_viewers();
// Orbs, primed TNT and falling blocks still to tick, in join order.
self.run_ordered_ticks(horizon_client::join_seq::JoinSeq::MAX, false)?;
horizon_client::spans::time("tick_experience", || self.tick_experience());
// Merged, despawned or picked up.
self.native_leaves_flush();
@@ -7649,6 +7697,8 @@ impl Game<'_> {
self.native_joins_flush(false, 0);
self.native_leaves_flush();
horizon_client::spans::time("tick_lan", || self.tick_lan(false));
// Everything that has joined has had its spawn packet.
self.ordered.announced = horizon_client::join_seq::JoinSeq::upcoming();
self.tick_friends();
horizon_client::spans::time("tick_hand", || self.tick_hand());
horizon_client::spans::time("tick_sleep", || self.tick_sleep());
@@ -7663,8 +7713,8 @@ impl Game<'_> {
self.keep_gateway_destinations();
}
if running {
horizon_client::spans::time("tick_falling", || self.tick_falling())?;
horizon_client::spans::time("tick_tnt", || self.tick_tnt())?;
// Primed TNT and falling blocks that joined since the spawn packets.
self.run_ordered_ticks(horizon_client::join_seq::JoinSeq::MAX, true)?;
self.apply_late_wind_pushes();
}
if running {
@@ -10762,6 +10812,7 @@ impl Game<'_> {
&mut self,
camera: glam::DVec3,
alpha: f64,
fov_degrees: f32,
mut out: Vec<Vertex>,
) -> (
Vec<Vertex>,
@@ -11297,14 +11348,43 @@ impl Game<'_> {
// Particles (ParticleEngine.extract): camera-facing quads.
self.mark_stage(out.len(), "PARTICLES");
let world = &self.world;
self.particles.render(
camera,
self.yaw,
self.pitch,
alpha as f32,
&|b| world.light(b[0], b[1], b[2]),
&mut out,
);
let particle_mode = self.settings.horizon.particle_culling;
if particle_mode == horizon_client::graphics::ParticleCullingMode::Off {
self.particles.render(
camera,
self.yaw,
self.pitch,
alpha as f32,
&|b| world.light(b[0], b[1], b[2]),
&mut out,
);
} else {
let frustum = self.view_frustum;
let pixel_focal_length = self.renderer.as_ref().map_or(0.0, |renderer| {
let tangent = (f64::from(fov_degrees).to_radians() * 0.5).tan();
if tangent.is_finite() && tangent > 0.0 {
(f64::from(renderer.config.height.max(1)) / (2.0 * tangent)) as f32
} else {
0.0
}
});
{
let mut particle_culling = self.particle_occlusion_context(camera);
self.particles.render_culled(
camera,
self.yaw,
self.pitch,
alpha as f32,
pixel_focal_length,
true,
frustum.as_ref(),
&mut |min, max| particle_culling.hidden(min, max),
&|b| world.light(b[0], b[1], b[2]),
&mut out,
);
}
self.finish_async_particle_culling();
}
laps.lap("eg_particles");
// Breaking progress overlays (destroy_stage_0..9): ours and the other players'.
self.mark_stage(out.len(), "DESTROY");
@@ -11421,7 +11501,7 @@ impl Game<'_> {
.sample(self.world.day_time, None, None);
return (15.0 - 15.0 * sky.sky_light_level).round() as i32;
}
let (rain, thunder) = self.world.weather.levels(1.0);
let (rain, thunder) = self.weather_levels(1.0);
// Sampled once per (time, weather): every mob asks each tick.
let key = (self.world.day_time, rain.to_bits(), thunder.to_bits());
if let Some((k, darken)) = self.sky_darken_memo.get()
@@ -11561,7 +11641,7 @@ impl Game<'_> {
state: None,
at,
spread,
speed: 0.0,
speed: [0.0; 3],
count: 0,
randomization: 0,
});
@@ -11789,7 +11869,7 @@ impl Game<'_> {
state: None,
at: [feet[0], feet[1] + height * 0.5, feet[2]],
spread: [0.1, 0.0, 0.1],
speed: 0.2,
speed: [0.2; 3],
count: (actual * 0.5) as u32 as i32,
randomization: 0,
});
@@ -12450,6 +12530,9 @@ impl Game<'_> {
if self.title.is_some() || self.saved_for_exit {
return Ok(());
}
// Native application termination can bypass the close request, so make the same
// client-side worker abort explicit before the game-owned streaming state is dropped.
self.streaming.abort_generation();
if let Some(server) = self.integrated.take() {
// The server thread saves the world.
server.stop()?;
@@ -13574,17 +13657,15 @@ impl Game<'_> {
}
(min + self.world.random.next_int_bound(max - min + 1).unwrap_or(0)) as u32
}
fn tick_experience(&mut self) {
if self.xp_delay > 0 {
self.xp_delay -= 1;
}
/// `ExperienceOrb.followNearbyPlayer`'s candidates: each orb goes for the
/// nearest living player within 8 blocks, the host's own or a guest. Each
/// is the player's feet and the point the orb homes on.
pub(super) fn orb_followed(&self) -> Vec<([f64; 3], [f64; 3])> {
let spectator = self.spectator();
let player = self
.player
.as_ref()
.filter(|p| !p.health.dead_or_dying() && !spectator);
// ExperienceOrb.followNearbyPlayer: each orb goes for the nearest
// living player within 8 blocks, the host's own or a guest.
let mut followed: Vec<([f64; 3], [f64; 3])> = player
.map(|p| {
let feet = [p.position.x, p.position.y, p.position.z];
@@ -13606,6 +13687,19 @@ impl Game<'_> {
}),
);
}
followed
}
/// The orbs' tick, but for the movement: that is `tick_ordered_before`'s,
/// in join order with the other kinds.
fn tick_experience(&mut self) {
if self.xp_delay > 0 {
self.xp_delay -= 1;
}
let spectator = self.spectator();
let player = self
.player
.as_ref()
.filter(|p| !p.health.dead_or_dying() && !spectator);
// Player.aiStep: the pickup area is the box inflated by (1, 0.5, 1).
let bounds = player.map(|p| {
let w = f64::from(p.dimensions.width) / 2.0;
@@ -13622,38 +13716,6 @@ impl Game<'_> {
],
)
});
let mut orbs = std::mem::take(&mut self.orbs);
// An orb has no random of its own here: lava draws from one made on
// first use, apart from the level stream.
let mut lava_random = None;
let mut next_float = || {
lava_random
.get_or_insert_with(dispenser::entity_random)
.next_float()
};
orbs.retain_mut(|o| {
let distance = |feet: &[f64; 3]| -> f64 {
(feet[0] - o.position.x).powi(2)
+ (feet[1] - o.position.y).powi(2)
+ (feet[2] - o.position.z).powi(2)
};
let target = followed
.iter()
.filter(|(feet, _)| distance(feet) < 64.0)
.min_by(|a, b| distance(&a.0).total_cmp(&distance(&b.0)))
.map(|(_, target)| *target);
o.tick(
&self.world,
self.res.facts(),
self.collision,
target,
self.remote.is_none(),
&mut next_float,
Some(self.border.geometry()),
&self.res.motion().fluids,
)
});
self.orbs = orbs;
// ExperienceOrb.scanForMerges runs on the server only.
if self.remote.is_none() {
self.merge_orbs();
@@ -14263,7 +14325,7 @@ impl Game<'_> {
/// `Level.isRainingAt`: it rains, the sky light is 15, nothing that stops
/// motion is above, and the biome's precipitation there is rain.
fn raining_at(&self, p: BlockPos) -> bool {
self.world.weather.levels(1.0).0 > 0.2
self.weather_levels(1.0).0 > 0.2
&& self.world.light(p.x, p.y, p.z) >> 4 == 15
&& self.rain_height(p.x, p.z) <= p.y
&& self.precipitation(p.x, p.y, p.z) == Some(false)
@@ -14286,7 +14348,7 @@ impl Game<'_> {
alpha: f64,
) -> Vec<horizon_client::weather::Vertex> {
use horizon_client::weather;
let (intensity, _) = self.world.weather.levels(alpha as f32);
let (intensity, _) = self.weather_levels(alpha as f32);
if intensity <= 0.0 {
return Vec::new();
}
@@ -14667,7 +14729,7 @@ impl Game<'_> {
}
}
// Level.isRaining: the rain level is above 0.2.
if self.ui.rules.bool("advance_weather") && self.world.weather.levels(1.0).0 > 0.2 {
if self.ui.rules.bool("advance_weather") && self.weather_levels(1.0).0 > 0.2 {
self.world.weather.raining = false;
self.world.weather.thundering = false;
self.world.weather.rain_time = 0;
@@ -15601,11 +15663,7 @@ impl Game<'_> {
// visual/water_fog_color: no dimension sets it, its default is #050533.
let water_fog = blend(|b| Some(b.water_fog), [0.0; 3]);
let mut sky = environment.sample(self.world.day_time, Some(biome_sky), Some(biome_fog));
let (rain, thunder) = if self.dim == Dim::Overworld {
self.world.weather.levels(alpha as f32)
} else {
(0.0, 0.0)
};
let (rain, thunder) = self.weather_levels(alpha as f32);
horizon_client::environment::apply_weather(&mut sky, rain, thunder);
self.end_flash_sky(&mut sky, alpha);
if self.flash > 0 && !self.settings.file.bool("hideLightningFlashes") {
@@ -15798,7 +15856,7 @@ impl Game<'_> {
if !title {
let (built, static_sections, visible_static_sections, static_stats) =
spans::time("entity_geometry", || {
self.entity_geometry(camera, alpha, entities)
self.entity_geometry(camera, alpha, fov_degrees, entities)
});
entities = built;
static_block_entities = static_sections;
@@ -15863,7 +15921,7 @@ impl Game<'_> {
if !title {
self.end_geometry(camera, &mut entities);
}
let weather = if !title && self.dim == Dim::Overworld && self.settings.horizon.weather {
let weather = if !title && self.can_have_weather() && self.settings.horizon.weather {
horizon_client::spans::time("weather", || self.weather_geometry(camera, alpha))
} else {
Vec::new()
@@ -18398,7 +18456,6 @@ impl Game<'_> {
self.frame_stats.record_gpu(&r.gpu_times);
r.gpu_times.clear();
}
horizon_client::ram_limit::frame();
self.limit_frame();
self.pause = self.pauses_game();
if let Some(server) = &self.integrated {
@@ -18435,6 +18492,13 @@ impl Game<'_> {
);
consumed = true;
}
if let Some(result) =
self.renderer.as_mut().and_then(|r| r.capture_result.take())
&& let Some(reply) = self.pending_render_capture.take()
{
let value = result.unwrap_or_else(|e| serde_json::json!({ "error": e }));
let _ = reply.send(value.to_string());
}
// A result nobody asked for was the world icon's
// (`tick_world_icon`): a failure tries again a second
// later, as `tryTakeScreenshotIfNeeded` does.
@@ -18895,6 +18959,7 @@ impl<'a> Game<'a> {
experience: Experience::default(),
orbs: Default::default(),
xp_delay: 0,
ordered: Default::default(),
last_level_up: 0,
swing: Default::default(),
swings_started: 0,
@@ -19030,6 +19095,7 @@ impl<'a> Game<'a> {
frame_stats: Default::default(),
perf: Default::default(),
pending_screenshot: None,
pending_render_capture: None,
pending_bench: None,
flight: None,
ui_wait: Default::default(),
@@ -19041,6 +19107,7 @@ impl<'a> Game<'a> {
entity_culler: None,
async_entity_culler: None,
async_entity_culling_failed: false,
async_particle_culler: RefCell::new(Default::default()),
pack_shadow_casters: (false, false),
pending_uploads: Vec::new(),
frame_graph: Default::default(),
@@ -19765,7 +19832,24 @@ fn load_core(
progress: &Progress,
launch_world: Option<&str>,
) -> std::result::Result<std::result::Result<CoreTables, String>, String> {
let assets = match startup::time("core.assets", || Assets::load(root)) {
// The model library reads every file under `assets/` and needs no
// block registry, so it is parsed beside `Assets::load` rather than
// after it. It used to sit inside `reload` behind both the registry
// read and the block facts; on a cold cache that read was most of a
// second on the critical path, and warm it is still ~30 ms.
// A server draws nothing and parses no models, so it skips this.
let (assets, parsed_models) = std::thread::scope(|scope| {
let models = (parallel && !headless).then(|| {
scope.spawn(|| {
let _step = startup::step("core.models_parse");
horizon_client::model_library::ParsedModels::load(root)
})
});
let assets = startup::time("core.assets", || Assets::load(root));
let models = models.map(|m| m.join().unwrap_or_else(|e| std::panic::resume_unwind(e)));
(assets, models)
});
let assets = match assets {
Ok(assets) => assets,
Err(e) => return Ok(Err(e.to_string())),
};
@@ -19777,9 +19861,12 @@ fn load_core(
let render = Step::spawn(scope, parallel, move || {
// A server reads no block sprites' pixels, which only the
// renderer draws (32 MB).
let parsed_models = parsed_models;
let render = startup::time("core.block_models_sprites", || {
if headless {
assets.reload_for_server(root)
} else if let Some(parsed) = parsed_models {
assets.reload_with_models(root, parsed)
} else {
assets.reload(root)
}
@@ -21748,9 +21835,49 @@ fn debug_crosshair_drawn(
#[cfg(test)]
mod tests {
#[test]
fn weather_follows_the_dimension_type_not_the_id() {
use super::level_can_have_weather as w;
assert!(w(true, false, false)); // open sky
assert!(!w(true, true, false)); // ceiling (Nether, overworld_caves)
assert!(!w(false, false, false)); // no sky light
assert!(!w(true, false, true)); // the End is named by id
}
use super::*;
use horizon_client::container_screen::{Button, Clicks, Release, Target};
#[test]
fn a_death_drops_the_off_hand_before_the_armour() {
let stack = |item: &str| Some(ItemStack::new(item, 1));
let mut inventory = vec![stack("minecraft:diamond"), None, stack("minecraft:stick")];
let mut offhand = stack("minecraft:shield");
let mut armor = [
stack("minecraft:iron_helmet"),
stack("minecraft:iron_chestplate"),
stack("minecraft:iron_leggings"),
stack("minecraft:iron_boots"),
];
let dropped: Vec<String> = death_drops(&mut inventory, &mut offhand, &mut armor)
.into_iter()
.map(|s| s.item.to_string())
.collect();
assert_eq!(
dropped,
[
"minecraft:diamond",
"minecraft:stick",
"minecraft:shield",
"minecraft:iron_boots",
"minecraft:iron_leggings",
"minecraft:iron_chestplate",
"minecraft:iron_helmet",
]
);
assert!(inventory.iter().all(Option::is_none));
assert!(offhand.is_none() && armor.iter().all(Option::is_none));
}
/// `MinecraftServer.computeNextAutosaveInterval`: three hundred seconds of
/// ticks at the rate the server runs at, never fewer than a hundred.
#[test]
@@ -864,6 +864,16 @@ impl Game<'_> {
self.armor_stand_location_effects(i, true);
}
self.armor_stand_turtle_eggs(i, landed)?;
let a = &self.armor_stands[i];
if !a.marker && !a.no_gravity {
self.entity_powder_snow_particles(
a.previous,
a.position,
a.bounds(),
a.velocity,
true,
);
}
let a = &mut self.armor_stands[i];
if !a.environment_tick(&self.world, self.res.facts(), self.pack.assets.registry) {
dead.push(i);
+84 -8
View File
@@ -5,9 +5,61 @@
use super::{Game, dedicated, lan::LanHost};
use horizon_chat_filter::Action;
use horizon_client::lan::hub::{HostEvent, chat_filter::Place};
use horizon_client::text::Text;
use horizon_protocol::packets::play::{self, Clientbound as C};
use horizon_protocol::text::{literal, translatable};
use horizon_server_files::user_lists::{BanEntry, NameAndId};
use horizon_world::nbt::Tag;
/// One line that `/mute`, `/tempmute`, `/mutelist`, `/unmute` and `/tempban` answer with: Horizon's own words,
/// or vanilla's message where vanilla has one, which each client shows in its language.
#[derive(Debug, PartialEq)]
pub(super) enum Reply {
Line(String),
/// A vanilla translation key with no argument.
Vanilla(&'static str),
}
impl Reply {
/// `EntityArgument.NO_PLAYERS_FOUND`, `argument.entity.notfound.player`: what `/kick` and the other
/// player commands answer for a name no player has.
pub(super) fn no_player() -> Self {
Self::Vanilla("argument.entity.notfound.player")
}
/// `BanPlayerCommands.ERROR_ALREADY_BANNED`: `commands.ban.failed`.
pub(super) fn already_banned() -> Self {
Self::Vanilla("commands.ban.failed")
}
/// The chat component a player is sent.
pub(super) fn tag(&self) -> Tag {
match self {
Self::Line(line) => literal(line),
Self::Vanilla(key) => translatable(key, &[]),
}
}
/// The text the console prints.
pub(super) fn text(&self) -> Text {
match self {
Self::Line(line) => Text::literal(line.clone()),
Self::Vanilla(key) => Text::translate(key, &[]),
}
}
}
impl From<String> for Reply {
fn from(line: String) -> Self {
Self::Line(line)
}
}
impl From<&str> for Reply {
fn from(line: &str) -> Self {
Self::Line(line.to_owned())
}
}
/// The operator level the mute commands need, as `/ban`'s.
const MUTE_LEVEL: u8 = 3;
@@ -171,7 +223,7 @@ impl Game<'_> {
let words: Vec<&str> = words.iter().copied().filter(|w| !w.is_empty()).collect();
self.mute_command(host, &words, &by)
.iter()
.map(|line| literal(line))
.map(Reply::tag)
.collect()
};
for content in replies {
@@ -192,7 +244,7 @@ impl Game<'_> {
host: &mut LanHost,
words: &[&str],
by: &str,
) -> Vec<String> {
) -> Vec<Reply> {
let reason = |from: usize| (words.len() > from).then(|| words[from..].join(" "));
match words {
["mutelist"] => {
@@ -214,13 +266,13 @@ impl Game<'_> {
let why = m.reason.map(|r| format!(": {r}")).unwrap_or_default();
lines.push(format!("{} was muted by {by} {until}{why}", m.name));
}
lines
lines.into_iter().map(Reply::from).collect()
}
["unmute", name] => vec![self.unmute(host, name, by)],
["unmute", name] => vec![self.unmute(host, name, by).into()],
["mute", name, ..] => vec![self.mute(host, name, None, reason(2), by)],
["tempmute", name, time, ..] => match horizon_chat_filter::parse_duration(time) {
Some(ms) => vec![self.mute(host, name, Some(ms), reason(3), by)],
None => vec![format!("{time} isn't a duration: 10m, 2h, 1d")],
None => vec![format!("{time} isn't a duration: 10m, 2h, 1d").into()],
},
["mute", ..] => vec!["/mute <player> [reason]".into()],
["tempmute", ..] => vec!["/tempmute <player> <duration> [reason]".into()],
@@ -237,7 +289,7 @@ impl Game<'_> {
time: Option<i64>,
reason: Option<String>,
by: &str,
) -> String {
) -> Reply {
// A player here, else one the server has seen (the user cache).
let user = host
.hub
@@ -247,7 +299,7 @@ impl Game<'_> {
.map(|g| (g.uuid, g.name.clone()))
.or_else(|| self.resolve_name(name).map(|u| (u.id, u.name)));
let Some((uuid, name)) = user else {
return format!("No player was found named {name}");
return Reply::no_player();
};
let until = time.map(|ms| horizon_chat_filter::now_millis() + ms);
let what = time.map_or_else(
@@ -265,7 +317,7 @@ impl Game<'_> {
&format!("[chat-filter] {by} muted {name} {what}{why}"),
);
}
format!("Muted {name} {what}{why}")
format!("Muted {name} {what}{why}").into()
}
/// Lifts `name`'s mute, logged; what to answer.
@@ -281,3 +333,27 @@ impl Game<'_> {
}
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn vanillas_messages_go_out_as_its_translation_keys() {
for (reply, key) in [
(Reply::no_player(), "argument.entity.notfound.player"),
(Reply::already_banned(), "commands.ban.failed"),
] {
assert_eq!(reply.tag(), translatable(key, &[]));
assert_eq!(reply.text().translation_key(), Some(key));
}
}
#[test]
fn horizons_own_lines_stay_literal() {
let reply = Reply::from("Muted Steve until unmuted");
assert_eq!(reply.tag(), literal("Muted Steve until unmuted"));
assert_eq!(reply.text().translation_key(), None);
assert_eq!(reply.text().plain(), "Muted Steve until unmuted");
}
}
+184 -15
View File
@@ -78,6 +78,11 @@ pub(super) enum Target {
/// A simulated lingering, creeper or dragon area-effect cloud.
Cloud(u32),
}
/// `Entity.setXRot`: reduce the angle before clamping the pitch.
fn entity_pitch(pitch: f32) -> f32 {
(pitch % 360.0).clamp(-90.0, 90.0)
}
/// An entity of a type Horizon does not simulate: its compound lives in the
/// entity memory (`persist.raw`), its position and rotation here.
#[derive(Clone, Debug)]
@@ -1508,6 +1513,8 @@ impl Game<'_> {
fn teleport_to_in_level(&mut self, t: Target, pos: [f64; 3], rotation: Option<[f32; 2]>) {
let from = self.target_position(t);
let v = Vec3::new(pos[0], pos[1], pos[2]);
// PositionMoveRotation.calculateAbsolute clamps pitch before setXRot.
let rotation = rotation.map(|[yaw, pitch]| [yaw, pitch.clamp(-90.0, 90.0)]);
match t {
Target::Guest(_) => {
self.for_player(t, |g| g.teleport_to(Target::Player, pos, rotation));
@@ -1533,8 +1540,12 @@ impl Game<'_> {
}
self.previous_position = v;
if let Some([yaw, pitch]) = rotation {
self.yaw = yaw;
self.pitch = pitch.clamp(-90.0, 90.0);
if yaw.is_finite() {
self.yaw = yaw;
}
if !pitch.is_nan() {
self.pitch = entity_pitch(pitch);
}
}
// A server player's teleport is told to the mods once their
// move is in the hub (`leave_guest`).
@@ -1562,10 +1573,14 @@ impl Game<'_> {
// Entity.teleportSetPosition: setYRot, setYHeadRot, setXRot
// (clamped to -90..90), then setOldRot.
if let Some([yaw, pitch]) = rotation {
m.yaw = yaw;
m.body_yaw = yaw;
m.head_yaw = yaw;
m.head_pitch = pitch.clamp(-90.0, 90.0);
if yaw.is_finite() {
m.yaw = yaw;
m.body_yaw = yaw;
m.head_yaw = yaw;
}
if !pitch.is_nan() {
m.head_pitch = entity_pitch(pitch);
}
m.previous_yaw = m.yaw;
m.previous_head_pitch = m.head_pitch;
}
@@ -1593,7 +1608,7 @@ impl Game<'_> {
if let Some(a) = self.armor_stands.iter_mut().find(|a| a.id == id) {
a.position = v;
a.previous = v;
if let Some([yaw, _]) = rotation {
if let Some([yaw, _]) = rotation.filter(|r| r[0].is_finite()) {
a.yaw = yaw;
}
}
@@ -1602,7 +1617,7 @@ impl Game<'_> {
if let Some(b) = self.boats.iter_mut().find(|b| b.id == id) {
b.position = v;
b.previous = v;
if let Some([yaw, _]) = rotation {
if let Some([yaw, _]) = rotation.filter(|r| r[0].is_finite()) {
b.yaw = yaw;
}
}
@@ -1611,7 +1626,7 @@ impl Game<'_> {
if let Some(c) = self.carts.iter_mut().find(|c| c.id == id) {
c.position = v;
c.previous = v;
if let Some([yaw, _]) = rotation {
if let Some([yaw, _]) = rotation.filter(|r| r[0].is_finite()) {
c.yaw = yaw;
}
}
@@ -1619,7 +1634,7 @@ impl Game<'_> {
Target::Fangs(id) => {
if let Some(f) = self.fangs.list.iter_mut().find(|f| f.id == id) {
f.pos = [v.x, v.y, v.z];
if let Some([yaw, _]) = rotation {
if let Some([yaw, _]) = rotation.filter(|r| r[0].is_finite()) {
f.yaw = yaw;
}
}
@@ -1628,8 +1643,12 @@ impl Game<'_> {
if let Some(o) = self.others.iter_mut().find(|o| o.id == id) {
o.position = v;
if let Some([yaw, pitch]) = rotation {
o.yaw = yaw;
o.pitch = pitch;
if yaw.is_finite() {
o.yaw = yaw;
}
if !pitch.is_nan() {
o.pitch = entity_pitch(pitch);
}
}
}
}
@@ -1777,7 +1796,7 @@ impl Game<'_> {
// Into the destination's level.
let level = self.target_level(dest);
// TeleportCommand.teleportToEntity: the destination's rotation too.
let rotation = Some(self.target_rotation(dest));
let rotation = Some(self.target_rotation(dest).map(wrap_degrees));
for &t in &targets {
if !self.teleport_across(t, level, pos, rotation) {
self.teleport_to(t, pos, rotation);
@@ -1810,7 +1829,10 @@ impl Game<'_> {
return Err(err("commands.teleport.invalidPosition", &[]));
}
let rotation = match ctx.get("rotation") {
Some(Arg::Coords(c)) => Some(c.rotation(self.source_rotation())),
Some(Arg::Coords(c @ Coordinates::World(axes))) => Some((
c.rotation(self.source_rotation()),
[axes[0].relative, axes[1].relative],
)),
_ => None,
};
// facing: look from the new position at a location or entity.
@@ -1855,7 +1877,19 @@ impl Game<'_> {
None => self.dim,
};
for &t in &targets {
let rotation = look_at(self, t).or(rotation);
let rotation = look_at(self, t).or_else(|| {
let (angles, relative) = rotation?;
let current = self.target_rotation(t);
// performTeleport wraps relative deltas before calculateAbsolute
// adds them back; wrapping the resolved pitch changes its clamp.
Some(std::array::from_fn(|axis| {
if relative[axis] {
current[axis] + wrap_degrees(angles[axis] - current[axis])
} else {
wrap_degrees(angles[axis])
}
}))
});
if self.teleport_across(t, source_level, pos, rotation) {
continue;
}
@@ -3924,6 +3958,141 @@ fn difficulty_names(from: u8, to: u8) -> (&'static str, &'static str) {
)
}
#[cfg(test)]
mod teleport_pitch_tests {
#[test]
#[ignore = "needs prepared resources in HORIZON_TEST_RESOURCES"]
fn teleport_and_rotate_resolve_pitch_at_their_own_boundary() {
use super::Target;
use crate::game::{Audio, Game, Options, Progress, Settings, load_resources};
let root = std::path::PathBuf::from(std::env::var_os("HORIZON_TEST_RESOURCES").unwrap());
let settings = Settings::default();
let loaded = load_resources(
root.clone(),
None,
&root,
&settings,
std::time::Instant::now(),
false,
true,
&Progress::new(),
&mut |_, _| unreachable!(),
)
.unwrap();
let mut options = Options::parse(std::iter::empty()).unwrap().unwrap();
options.resources = root.clone();
options.execution_role = crate::game::execution_role::ExecutionRole::IntegratedServer;
let mut game = Game::new(
&loaded.resources,
loaded.pack,
loaded.gui.unwrap(),
options,
settings,
Audio::silent(&root),
None,
)
.unwrap();
let kind = game
.res
.mob_types()
.get("minecraft:zombie")
.unwrap()
.clone();
game.mobs.push(horizon_client::mobs::Mob::new(
42,
kind,
horizon_core::geometry::Vec3::new(0.0, 0.0, 0.0),
0.0,
));
for (rotation, expected) in [
([40.0, f32::NAN], [40.0, 20.0]),
([f32::INFINITY, 30.0], [10.0, 30.0]),
([40.0, f32::INFINITY], [40.0, 90.0]),
([40.0, f32::NEG_INFINITY], [40.0, -90.0]),
] {
game.yaw = 10.0;
game.pitch = 20.0;
game.teleport_to_in_level(Target::Player, [0.0; 3], Some(rotation));
assert_eq!([game.yaw, game.pitch], expected);
game.mobs[0].yaw = 10.0;
game.mobs[0].head_pitch = 20.0;
game.teleport_to_in_level(Target::Mob(42), [0.0; 3], Some(rotation));
assert_eq!([game.mobs[0].yaw, game.mobs[0].head_pitch], expected);
}
game.build_registries();
game.set_allow_commands(true);
for (command, expected) in [
("rotate @e[type=minecraft:zombie,limit=1] 0 360", 90.0),
("tp @e[type=minecraft:zombie,limit=1] 0 0 0 0 360", 0.0),
("tp @e[type=minecraft:zombie,limit=1] 0 0 0 0 270", -90.0),
] {
assert!(game.run_command(command), "{command}");
assert_eq!(game.mobs[0].head_pitch, expected, "{command}");
}
for (source, target, angle, expected) in [
(90.0, 90.0, "~100", 90.0),
(-90.0, -90.0, "~-100", -90.0),
(0.0, -90.0, "~100", -90.0),
(0.0, 90.0, "~-100", 90.0),
] {
game.pitch = source;
game.mobs[0].head_pitch = target;
assert!(game.run_command(&format!(
"tp @e[type=minecraft:zombie,limit=1] 0 0 0 0 {angle}"
)));
assert_eq!(game.mobs[0].head_pitch, expected);
}
game.yaw = 190.0;
game.mobs[0].yaw = 170.0;
assert!(game.run_command("tp @e[type=minecraft:zombie,limit=1] 0 0 0 ~ ~"));
assert_eq!(game.mobs[0].yaw, 190.0, "relative yaw wraps the delta");
game.mobs[0].head_pitch = 360.0;
assert!(
game.run_command(
"tp @e[type=minecraft:zombie,limit=1] @e[type=minecraft:zombie,limit=1]"
)
);
assert_eq!(
game.mobs[0].head_pitch, 0.0,
"destination rotation wraps too"
);
let overflow = "9".repeat(400);
for (pitch, expected) in [(overflow.clone(), 90.0), (format!("-{overflow}"), -90.0)] {
assert!(game.run_command(&format!(
"rotate @e[type=minecraft:zombie,limit=1] 0 {pitch}"
)));
assert_eq!(game.mobs[0].head_pitch, expected);
}
for (yaw, pitch, expected) in [
("40", overflow.as_str(), [40.0, 20.0]),
(overflow.as_str(), "30", [10.0, 30.0]),
] {
game.mobs[0].yaw = 10.0;
game.mobs[0].head_pitch = 20.0;
assert!(game.run_command(&format!(
"tp @e[type=minecraft:zombie,limit=1] 0 0 0 {yaw} {pitch}"
)));
assert_eq!([game.mobs[0].yaw, game.mobs[0].head_pitch], expected);
}
}
#[test]
fn pitch_wraps_before_clamping() {
assert_eq!(super::entity_pitch(360.0), 0.0);
assert_eq!(super::entity_pitch(450.0), 90.0);
assert_eq!(super::entity_pitch(-360.0), 0.0);
assert_eq!(super::entity_pitch(-450.0), -90.0);
assert_eq!(super::entity_pitch(super::wrap_degrees(270.0)), -90.0);
assert_eq!(super::entity_pitch(super::wrap_degrees(-270.0)), 90.0);
assert_eq!(super::entity_pitch(super::wrap_degrees(360.0)), 0.0);
assert_eq!(super::entity_pitch(super::wrap_degrees(450.0)), 90.0);
assert_eq!(super::wrap_degrees(190.0), -170.0);
assert_eq!(super::wrap_degrees(540.0), -180.0);
}
}
#[cfg(test)]
mod difficulty_tests {
use super::difficulty_names;
@@ -234,6 +234,24 @@ impl Game<'_> {
},
}
}
/// `LivingEntity.createEquipmentSlotAccess`: every slot but head, mainhand
/// and offhand takes only an empty stack or one whose
/// `getEquipmentSlotForItem` is that slot (a non-equippable item is mainhand).
fn equipment_slot_accepts(&self, s: &Slot, stack: Option<&ItemStack>) -> bool {
let name = match s {
Slot::Guest(_, inner) => return self.equipment_slot_accepts(inner, stack),
Slot::Armor(i @ 1..=3) => ["head", "chest", "legs", "feet"][*i],
Slot::Mob(_, key) if matches!(*key, "chest" | "legs" | "feet") => key,
_ => return true,
};
// ItemStack.isEmpty: air or a count of 0.
let Some(stack) = stack.filter(|s| &*s.item != "minecraft:air" && s.count > 0) else {
return true;
};
self.items()
.get(&stack.item)
.is_some_and(|info| info.equip_slot.as_deref() == Some(name))
}
/// Put a stack (or nothing) in a slot; false when the slot cannot take it.
pub(in crate::game) fn slot_set(&mut self, s: &Slot, stack: Option<ItemStack>) -> bool {
match s {
@@ -751,7 +769,7 @@ impl Game<'_> {
s.count = s.count.min(max);
s
});
if self.slot_set(slot, new) {
if self.equipment_slot_accepts(slot, new.as_ref()) && self.slot_set(slot, new) {
changed += 1;
}
}
@@ -888,7 +906,7 @@ impl Game<'_> {
// ItemStack.isEmpty: air (or a count of 0) is an empty slot.
// SlotAccess.set counts every slot it sets, the same item too.
let item = item.filter(|s| &*s.item != "minecraft:air" && s.count > 0);
if self.slot_set(slot, item) {
if self.equipment_slot_accepts(slot, item.as_ref()) && self.slot_set(slot, item) {
changed += 1;
}
}
@@ -906,7 +924,8 @@ impl Game<'_> {
let zero = match &known {
Some(k) => err(
"commands.item.target.failed.known_item",
&[&k.item.to_string()],
// The ItemStack itself is the argument: ItemStack.toString.
&[&format!("{} {}", k.count, k.item)],
),
None => err("commands.item.target.failed", &[]),
};
+66
View File
@@ -129,6 +129,25 @@ impl Game<'_> {
let _ = flight.reply.send(summary.to_string());
}
}
/// The game's settings a render capture records beside the renderer's own state.
fn render_capture_settings(&self) -> horizon_client::gfx::capture::Settings {
let s = &self.settings;
horizon_client::gfx::capture::Settings {
graphics_api: format!("{:?}", s.horizon.api),
translucent_batching: s.horizon.translucent_batching,
texture_filtering: s.file.int("textureFiltering"),
anisotropy_bit: s.file.int("maxAnisotropyBit"),
mipmap_levels: s.mipmap_levels.max(0) as u32,
resolution_scale: s.horizon.resolution_scale as f32 / 100.0,
fxaa: s.horizon.fxaa,
taa: s.horizon.taa,
upscale: s.horizon.upscaling.ratio(),
render_distance: self.streaming.radius,
lod_distance: self.far_terrain_choice().0,
resources: self.options.resources.clone(),
atlas: horizon_client::gfx::capture::AtlasCheck::of(&self.pack.render),
}
}
/// The frame summary, with Horizon's own passes' median GPU times while they are timed.
fn summary_with_passes(&self) -> Value {
let mut summary = self.frame_stats.summary();
@@ -396,6 +415,53 @@ impl Game<'_> {
}
Ok(Some(json!({ "ok": true, "gpu_passes": self.gpu_passes })))
}
"render-capture" => match words.get(1).copied() {
None => {
let r = self.renderer.as_ref().ok_or("no renderer")?;
Ok(Some(
json!({ "ok": true, "keeping": r.keeps_capture_copies() }),
))
}
Some("on") => {
let r = self.renderer.as_mut().ok_or("no renderer")?;
if !r.keeps_capture_copies() {
r.keep_capture_copies(true);
// The copies start empty: every section and far tile is meshed
// again, as after a relayout.
self.clear_lod();
self.all_sections_changed();
}
Ok(Some(json!({ "ok": true, "keeping": true })))
}
Some("off") => {
let r = self.renderer.as_mut().ok_or("no renderer")?;
r.keep_capture_copies(false);
Ok(Some(json!({ "ok": true, "keeping": false })))
}
Some(_) => {
if self.pending_render_capture.is_some() {
return Err("a render capture is already pending".into());
}
// The rest of the line: a path may hold spaces.
let dir = line
.trim_start()
.strip_prefix("render-capture")
.unwrap_or("");
let settings = self.render_capture_settings();
let r = self.renderer.as_mut().ok_or("no renderer")?;
if !r.keeps_capture_copies() {
return Err("no mesh copies kept: run render-capture on (or start with \
HORIZON_RENDER_CAPTURE=1) and let the terrain settle first"
.into());
}
r.capture = Some(horizon_client::gfx::capture::Request {
dir: dir.trim().into(),
settings,
});
self.pending_render_capture = Some(reply.clone());
Ok(None)
}
},
"section-sides" => {
let r = self.renderer.as_mut().ok_or("no renderer")?;
match words.get(1).copied() {
+42 -6
View File
@@ -69,7 +69,7 @@ pub(super) struct Creatures {
/// The wind charge whose burst is being handled, by entity id: which
/// entities have already ticked in vanilla's spawn-ordered tick list
/// (game/wind.rs).
pub wind_source: Option<u32>,
pub wind_source: Option<horizon_client::join_seq::JoinSeq>,
/// Wind pushes held until the entity's own tick has run, by entity id
/// (game/wind.rs `apply_late_wind_pushes`).
pub late_wind_pushes: Vec<(u32, crate::game::Vec3)>,
@@ -331,6 +331,7 @@ impl Game<'_> {
sleeping: self.sleeping.is_some(),
sleep_timer: self.sleep_timer,
passenger: self.riding.is_some(),
riding_vehicle: self.riding,
vehicle: self.riding.and_then(|id| {
if let Some(b) = self.boats.iter().find(|b| b.id == id) {
// A boat's box: 1.375 wide and 0.5625 high around its position.
@@ -801,10 +802,8 @@ impl Game<'_> {
self.world.bottom_y()
}
pub(super) fn mob_world_base<'s>(&'s self, others: &'s [Seen]) -> MobWorld<'s> {
let (rain, thunder) = self.world.weather.levels(1.0);
// Level.canHaveWeather: only the overworld's rain and thunder levels
// ever rise, so nothing rains or thunders in the Nether or the End.
let weather = self.dim == Dim::Overworld;
let (rain, thunder) = self.weather_levels(1.0);
let weather = self.can_have_weather();
let player = self.player_view();
MobWorld {
world: &self.world,
@@ -814,6 +813,7 @@ impl Game<'_> {
movement: &self.motion.blocks,
collision: self.collision,
data: self.res.mob_data(),
controlling_player_movement: None,
nearest_player: player.as_ref().filter(|p| !p.spectator).map(|p| p.position),
player,
others,
@@ -1034,6 +1034,20 @@ impl Game<'_> {
..base.clone()
};
let m = &mut mobs[i];
w.controlling_player_movement = horizon_client::mobs::equine::controlled(m)
.then(|| {
base.player
.as_ref()
.filter(|p| p.riding_vehicle == Some(m.id))
.map(|p| p.velocity)
.or_else(|| {
guests
.iter()
.find(|(_, p)| p.riding_vehicle == Some(m.id))
.map(|(_, p)| p.velocity)
})
})
.flatten();
// getCurrentDifficultyAt(blockPosition()): the mob's own chunk,
// not the local player's (a server thread has no player).
w.difficulty = self.local_difficulty([m.position.x, m.position.y, m.position.z]);
@@ -1189,6 +1203,7 @@ impl Game<'_> {
}
self.handle_mob_events(events)?;
self.lan_guest_mob_events(guest_events);
self.ordered_before(super::ordered_tick::Batch::Projectiles)?;
self.tick_projectiles()?;
self.tick_fangs();
self.tick_allays();
@@ -1908,6 +1923,9 @@ impl Game<'_> {
.map_or([0.0; 3], |m| [m.velocity.x, m.velocity.y, m.velocity.z]);
self.drown_particles(at, v);
}
MobEvent::PowderSnowParticle { at, velocity } => {
self.snowflake_particle(at, velocity);
}
MobEvent::SunProtectionWear { mob } => self.wear_sun_protection(mob),
MobEvent::ArmorHurt { mob, amount, kind } => self.hurt_mob_armor(mob, amount, kind),
MobEvent::EntityEvent { mob, event, at } => {
@@ -3801,6 +3819,7 @@ impl Game<'_> {
let mut shoot_events = Vec::new();
let mut trails = Vec::new();
let mut bubble_tops = Vec::new();
let mut snow_contacts = Vec::new();
let mut keep_flags = vec![true; projectiles.len()];
// The impacts the mods may cancel (`native_projectile_impact`), on a server.
let hear = self.native_hears_impacts();
@@ -3915,6 +3934,19 @@ impl Game<'_> {
})
}
};
if (p.is_thrown() && !matches!(p.kind, ProjectileKind::LlamaSpit))
|| p.is_arrow() && p.arrow.as_ref().is_none_or(|a| !a.no_physics)
{
for block in horizon_client::powder_snow::contacts(
p.previous,
p.position,
p.bounds(),
false,
|at| w.block_name(at.x, at.y, at.z) == "minecraft:powder_snow",
) {
snow_contacts.push((block, p.position, p.velocity));
}
}
if shooter.is_some() {
p.owner = Some(Who::Player);
}
@@ -4005,6 +4037,9 @@ impl Game<'_> {
}
}
}
for (block, position, movement) in snow_contacts {
self.powder_snow_particle(block, position, movement);
}
let listed = keep_flags.clone();
let mut idx = 0;
projectiles.retain(|_| {
@@ -6074,7 +6109,7 @@ impl Game<'_> {
state: None,
at,
spread,
speed: 0.2,
speed: [0.2; 3],
count: count as i32,
randomization: 0,
});
@@ -7723,6 +7758,7 @@ mod pearl_tests {
collision: &collision,
data: &data,
player: None,
controlling_player_movement: None,
nearest_player: None,
others: &[],
dragon: None,
+3 -1
View File
@@ -550,7 +550,9 @@ impl Game<'_> {
}
/// `LocalPlayer.isReducedDebugInfo`: the server's rule or the option.
pub(super) fn reduced_debug_info(&self) -> bool {
self.settings.reduced_debug_info || self.ui.rules.bool("reduced_debug_info")
self.settings.reduced_debug_info
|| self.ui.rules.bool("reduced_debug_info")
|| self.remote.as_ref().is_some_and(|r| r.reduced_debug_info)
}
/// `DebugScreenEntryList.isCurrentlyEnabled` for an entry's path.
pub(super) fn debug_entry(&self, path: &str) -> bool {
+76 -4
View File
@@ -441,6 +441,37 @@ pub(super) struct Lists {
pub stop: bool,
/// `MinecraftServer.isAutoSave`: all of Horizon's server levels share this save flag.
pub autosave: bool,
/// UUID prefixes (lower case, with dashes) that pass the whitelist: `whitelist-bypass.txt`.
pub whitelist_bypass: Vec<String>,
}
/// The lines of `whitelist-bypass.txt`: one UUID prefix each, e.g. `00000000-0000-0000-0009-` for Floodgate's
/// Bedrock players. `#` starts a comment. A prefix has to be a dashed UUID start of at least 8 characters, so
/// a typo can't open the whitelist to everybody.
fn parse_whitelist_bypass(text: &str) -> std::result::Result<Vec<String>, String> {
let mut out = Vec::new();
for (n, line) in text.lines().enumerate() {
let line = line
.split('#')
.next()
.unwrap_or("")
.trim()
.to_ascii_lowercase();
if line.is_empty() {
continue;
}
if line.len() < 8
|| line.len() > 36
|| !line.chars().all(|c| c.is_ascii_hexdigit() || c == '-')
{
return Err(format!(
"whitelist-bypass.txt line {}: {line:?} is not a UUID prefix",
n + 1
));
}
out.push(line);
}
Ok(out)
}
impl Lists {
fn load() -> Self {
@@ -455,7 +486,24 @@ impl Lists {
player_idle_timeout: 0,
stop: false,
autosave: true,
whitelist_bypass: Vec::new(),
};
// Horizon only: players from a proxy's Bedrock bridge (Floodgate) are never on whitelist.json.
if let Ok(text) = std::fs::read_to_string("whitelist-bypass.txt") {
match parse_whitelist_bypass(&text) {
Ok(prefixes) => {
log(
"INFO",
&format!(
"whitelist-bypass.txt: {} UUID prefix(es) skip the whitelist",
prefixes.len()
),
);
l.whitelist_bypass = prefixes;
}
Err(e) => log("ERROR", &format!("{e}; the file is ignored")),
}
}
// Each list tells the event stream what changes in it, as vanilla's tell their `NotificationService`.
l.ops.watch(|change| {
let (kind, e) = listed("operators", change);
@@ -501,7 +549,16 @@ impl Lists {
}
/// PlayerList.isWhiteListed.
fn whitelisted(&self, user: &NameAndId) -> bool {
!self.use_whitelist || self.ops.contains(user) || self.white.contains(user)
!self.use_whitelist
|| self.ops.contains(user)
|| self.white.contains(user)
|| self.bypasses_whitelist(user.id)
}
fn bypasses_whitelist(&self, id: u128) -> bool {
let id = horizon_protocol::crypto::uuid_string(id);
self.whitelist_bypass
.iter()
.any(|p| id.starts_with(p.as_str()))
}
/// PlayerList.canPlayerLogin before the player count.
fn can_login(&mut self, address: std::net::SocketAddr, user: &NameAndId) -> Option<Tag> {
@@ -1564,7 +1621,7 @@ impl Game<'_> {
let replies = self.mute_command(&mut host, &words, "Server");
self.lan = Some(host);
for reply in replies {
self.console_reply(lit(&reply));
self.console_reply(reply.text());
}
}
}
@@ -1575,7 +1632,7 @@ impl Game<'_> {
let replies = self.tempban_command(&mut host, &words, "Server");
self.lan = Some(host);
for reply in replies {
self.console_reply(lit(&reply));
self.console_reply(reply.text());
}
}
}
@@ -2165,7 +2222,9 @@ fn png_size(bytes: &[u8]) -> Option<(u32, u32)> {
#[cfg(test)]
mod tests {
use super::{capture_log, log, log_from, overload_warning, panic_message};
use super::{
capture_log, log, log_from, overload_warning, panic_message, parse_whitelist_bypass,
};
use std::{
fs,
io::{self, BufRead, BufReader, Read, Write},
@@ -2173,6 +2232,18 @@ mod tests {
time::{SystemTime, UNIX_EPOCH},
};
#[test]
fn whitelist_bypass_file_takes_uuid_prefixes_and_refuses_junk() {
let ok =
parse_whitelist_bypass("# Bedrock\n00000000-0000-0000-0009- # floodgate\n\n").unwrap();
assert_eq!(ok, vec!["00000000-0000-0000-0009-".to_owned()]);
assert!(
parse_whitelist_bypass("0-").is_err(),
"a short prefix would match nearly everyone"
);
assert!(parse_whitelist_bypass("not-a-uuid-at-all").is_err());
}
/// `SaveAllCommand.saveAll`: a save that throws is the `ERROR_FAILED` the
/// source is told about, not a log line the caller never sees.
#[test]
@@ -2325,6 +2396,7 @@ mod tests {
player_idle_timeout: 0,
stop: false,
autosave: true,
whitelist_bypass: Vec::new(),
};
// Every translation key and string in a message, in the order they come.
fn words(tag: &super::Tag, out: &mut Vec<String>) {
@@ -187,6 +187,28 @@ impl Game<'_> {
self.set_default_game_mode(state.game_mode);
return json!({ "value": GAME_MODES[state.game_mode as usize] });
}
"serversettings/operator_user_permission_level" => {
return json!({ "value": state.op_level });
}
"serversettings/operator_user_permission_level/set" => {
let Some(level) = body["value"]
.as_i64()
.and_then(|value| i32::try_from(value).ok())
.filter(|level| (0..=4).contains(level))
else {
return json!({
"error": "operator user permission level must be an integer between 0 and 4"
});
};
rpc(format!(
"Update operator user permission level from {} to {}",
state.op_level, level
));
state.op_level = level;
state.lists.lock().unwrap().op_level = level;
self.store_property("op-permission-level", level.to_string());
return json!({ "value": state.op_level });
}
"serversettings/force_game_mode" => {
return json!({ "value": state.force_game_mode });
}
+1 -1
View File
@@ -50,7 +50,7 @@ const BREATH_WAIT: i32 = 20;
/// `AreaEffectCloud.serverTick`: discarded once `tickCount - waitTime >=
/// duration`, so the wait does not count against the duration.
fn breath_expired(age: i32, duration: i32) -> bool {
pub(super) fn breath_expired(age: i32, duration: i32) -> bool {
age - BREATH_WAIT >= duration
}
+21 -4
View File
@@ -112,6 +112,14 @@ fn exit_target(exit: [i32; 3], exact: bool, find: impl FnOnce([i32; 3]) -> [i32;
if exact { exit } else { find(exit) }
}
fn fallback_spawn(own: Option<Vec3>, world: Option<[i32; 3]>) -> Vec3 {
let s = own.unwrap_or_else(|| {
let [x, y, z] = world.unwrap_or([0, 64, 0]);
Vec3::new(f64::from(x), f64::from(y), f64::from(z))
});
Vec3::new(s.x.floor() + 0.5, s.y, s.z.floor() + 0.5)
}
#[derive(Default)]
pub(super) struct EndState {
/// Ticks until the player can use a gateway again (TheEndGatewayBlockEntity cooldown).
@@ -589,8 +597,7 @@ impl Game<'_> {
f64::from(c.pos[2]) + 0.5,
));
}
let s = self.level.spawn.unwrap_or([0.0, 64.0, 0.0]);
Some(Vec3::new(s[0].floor() + 0.5, s[1], s[2].floor() + 0.5))
Some(fallback_spawn(self.spawn, self.level.world_spawn))
}
/// Where an End portal's traveller lands once `target` has loaded, and
@@ -641,8 +648,7 @@ impl Game<'_> {
if let Some((at, yaw)) = self.find_respawn_and_use(c, false)? {
return Ok(Some((at, Some(yaw))));
}
let s = self.level.spawn.unwrap_or([0.0, 64.0, 0.0]);
target = Vec3::new(s[0].floor() + 0.5, s[1], s[2].floor() + 0.5);
target = fallback_spawn(self.spawn, self.level.world_spawn);
}
let (x, z) = (target.x.floor() as i32, target.z.floor() as i32);
// TeleportTransition.missingRespawnBlock: PlayerSpawnFinder around
@@ -1691,6 +1697,17 @@ mod tests {
);
}
#[test]
fn leaving_the_end_without_a_point_of_its_own_goes_to_the_world_spawn() {
let world = Some([220, 63, -41]);
assert_eq!(fallback_spawn(None, world), Vec3::new(220.5, 63.0, -40.5));
assert_eq!(
fallback_spawn(Some(Vec3::new(10.5, 70.0, 12.5)), world),
Vec3::new(10.5, 70.0, 12.5)
);
assert_eq!(fallback_spawn(None, None), Vec3::new(0.5, 64.0, 0.5));
}
#[test]
fn end_gateway_job_reads_the_block_entity_and_keeps_new_sources_loaded() {
let gateway = [702, 100, 0];
+3 -2
View File
@@ -155,8 +155,9 @@ pub(super) trait Entity: EntityRules {
let b = self.explosion_box();
f64::from((b.max_position().y - b.min_position().y) as f32 * 0.85f32)
}
/// Whether this kind ticks after the projectiles do (orbs, falling blocks,
/// primed TNT), where vanilla ticks every entity in the order it joined.
/// Whether this kind can still be waiting for its tick when a projectile
/// ticks, though it joined before it (orbs, falling blocks, primed TNT: they
/// tick between the batches, `game/ordered_tick.rs`).
fn ticks_after_projectiles(&self) -> bool {
false
}
+3 -1
View File
@@ -490,7 +490,9 @@ impl Game<'_> {
p.velocity.z + push[2],
);
if !(creative && flying) {
pushed = (!p.health.sync_velocity).then_some(push);
// ServerExplosion.hitPlayers: the packet carries the push even when the hurt
// also marks the velocity (its motion packet follows).
pushed = Some(push);
}
}
}
@@ -409,6 +409,13 @@ impl Game<'_> {
};
r.free_flight(&mut scene);
}
self.entity_powder_snow_particles(
r.previous,
r.position,
r.bounds(),
r.velocity,
false,
);
// hitTargetOrDeflectSelf on an entity: a breeze turns it back
// (ProjectileDeflection.REVERSE), anything else sets it off.
// onHitBlock: only a rocket with explosions (hasExplosion) goes
+2 -1
View File
@@ -602,7 +602,7 @@ impl Game<'_> {
state: None,
at,
spread,
speed,
speed: [speed; 3],
count: count as i32,
randomization: 0,
});
@@ -839,6 +839,7 @@ impl Game<'_> {
h.velocity = Vec3::ZERO;
}
}
self.entity_powder_snow_particles(h.previous, h.position, h.bounds(), h.velocity, false);
h.velocity = Vec3::new(
h.velocity.x * 0.92,
h.velocity.y * 0.92,
+126 -8
View File
@@ -25,6 +25,7 @@ use horizon_world::block_collision::BlockCollisionRegistry;
use std::{
collections::HashMap,
sync::{Arc, Mutex},
time::Instant,
};
/// What `sync_data` loaded: whether it was with data packs over the game's
@@ -1074,10 +1075,21 @@ fn mob_freeze_meta(
meta: &mut Vec<(u8, i32, Value)>,
defaults: &mut Vec<(u8, i32, Value)>,
) {
if m.ticks_frozen > 0 {
// `setTicksFrozen` can go negative (a mob warming up), and a client reads
// the count as is, so anything but the default 0 goes out.
if m.ticks_frozen != 0 {
meta.push((7, serializer::INT, Value::Int(m.ticks_frozen)));
}
defaults.push((7, serializer::INT, Value::Int(0)));
// Entity.DATA_AIR_SUPPLY_ID (1): only an axolotl ticks `Mob.air` (its
// default is its 6000 max air supply).
if m.species() == horizon_client::mobs::Species::Axolotl {
let max = horizon_client::mobs::axolotl::MAX_AIR;
if m.air != max {
meta.push((1, serializer::INT, Value::Int(m.air)));
}
defaults.push((1, serializer::INT, Value::Int(max)));
}
if m.kind.id == "minecraft:strider" {
if m.extra.flag {
meta.push((19, serializer::BOOLEAN, Value::Bool(true)));
@@ -1813,7 +1825,16 @@ impl Game<'_> {
entities: &[EntityState],
spawn: [f64; 3],
) -> Option<LanHost> {
// A slow tick's line says which event took it, and whose (`spans::note`): each event's
// time is noted when the next one starts (an event's arm may `continue`), the last's
// after the loop.
let timed = horizon_client::spans::recording_here();
let mut previous = None;
for event in events {
if timed {
note_event(&host, previous.take());
previous = Some((Instant::now(), event_kind(&event)));
}
match event {
event @ (HostEvent::Chat { .. } | HostEvent::Warn(_) | HostEvent::Error(_)) => {
self.lan_log_event(event);
@@ -2058,6 +2079,7 @@ impl Game<'_> {
}
}
}
note_event(&host, previous);
Some(host)
}
@@ -2102,20 +2124,24 @@ impl Game<'_> {
host.hub.mods_loaded = !horizon_client::mod_api::mods().is_empty();
let pass = self.level_pass;
let mut events = if pass.first {
host.hub.poll(&mut ctx)
horizon_client::spans::time("lan_poll", || host.hub.poll(&mut ctx))
} else {
Vec::new()
};
events.extend(host.hub.drain_packets(&mut ctx));
events.extend(horizon_client::spans::time("lan_drain", || {
host.hub.drain_packets(&mut ctx)
}));
events
};
let Some(back) = self.lan_process_events(host, events, entities.as_slice(), spawn) else {
let Some(back) = horizon_client::spans::time("lan_events", || {
self.lan_process_events(host, events, entities.as_slice(), spawn)
}) else {
return;
};
host = back;
if !host.quiet.is_empty() {
self.lan = Some(host);
self.run_quiet_commands();
horizon_client::spans::time("lan_quiet_commands", || self.run_quiet_commands());
host = self
.lan
.take()
@@ -2123,7 +2149,9 @@ impl Game<'_> {
}
if !host.hub.native_advancement_grants.is_empty() {
self.lan = Some(host);
self.run_native_advancement_grants();
horizon_client::spans::time("lan_advancement_grants", || {
self.run_native_advancement_grants()
});
host = self
.lan
.take()
@@ -2131,7 +2159,7 @@ impl Game<'_> {
}
if !host.hub.native_menu_events.is_empty() {
self.lan = Some(host);
self.run_native_menu_events();
horizon_client::spans::time("lan_menu_events", || self.run_native_menu_events());
host = self
.lan
.take()
@@ -2349,6 +2377,8 @@ impl Game<'_> {
}
host.hub
.set_immediate_respawn(self.ui.rules.bool("immediate_respawn"));
host.hub
.set_reduced_debug_info(self.ui.rules.bool("reduced_debug_info"));
host.hub
.set_limited_crafting(self.ui.rules.bool("limited_crafting"));
// A server with several levels runs a pass for each
@@ -2997,9 +3027,97 @@ fn equipment_slot_name(slot: horizon_world::player_inventory::EquipmentSlot) ->
}
}
/// What a hub event is, whose connection, and the name of a player who left (no longer in the
/// hub once it is handled): for a slow tick's notes.
type EventKind = (&'static str, Option<u32>, Option<String>);
fn event_kind(event: &HostEvent) -> EventKind {
match event {
HostEvent::Joined(c) => ("join", Some(*c), None),
HostEvent::Left(g) => ("leave", None, Some(g.name.clone())),
HostEvent::Packet(c, p) => (p.name(), Some(*c), None),
HostEvent::MainHandChanged(c, _) => ("main hand", Some(*c), None),
HostEvent::LocaleChanged(c, _) => ("locale", Some(*c), None),
HostEvent::PlayerLoaded(c) => ("loaded", Some(*c), None),
HostEvent::RecipeBookSettings { conn, .. } => ("recipe book", Some(*conn), None),
HostEvent::Sneak { conn, .. } => ("sneak", Some(*conn), None),
HostEvent::Input { conn, .. } => ("input", Some(*conn), None),
HostEvent::Kicked { name, .. } => ("kick", None, Some(name.clone())),
HostEvent::Flight { conn, .. } => ("flight", Some(*conn), None),
HostEvent::Chat { .. } => ("chat line", None, None),
HostEvent::PlayerChat { .. } => ("chat", None, None),
HostEvent::ChatFiltered { name, .. } => ("filtered chat", None, Some(name.clone())),
HostEvent::Warn(_) => ("warning", None, None),
HostEvent::Error(_) => ("error", None, None),
HostEvent::Ban { name, .. } => ("ban", None, Some(name.clone())),
}
}
/// Notes how long the event that started at `started` took (`spans::note`).
fn note_event(host: &LanHost, started: Option<(Instant, EventKind)>) {
let Some((started, (kind, conn, name))) = started else {
return;
};
horizon_client::spans::note(started.elapsed().as_secs_f32() * 1000.0, || {
let who = name
.or_else(|| conn.and_then(|c| host.hub.guest(c)).map(|g| g.name.clone()))
.or_else(|| conn.map(|c| format!("connection {c}")));
match who {
Some(who) => format!("{kind} of {who}"),
None => kind.to_owned(),
}
});
}
#[cfg(test)]
mod tests {
use super::{OFFHAND_SLOT, equipment_slot_name, living_flags};
use super::{OFFHAND_SLOT, equipment_slot_name, living_flags, mob_freeze_meta};
use horizon_client::mobs::Mob;
use horizon_protocol::entity_data::{Value, serializer};
fn mob_of(kind: &str) -> Option<Mob> {
let root = std::path::Path::new(env!("CARGO_MANIFEST_DIR"))
.join("../../.local/horizon-client")
.join(horizon_core::VANILLA_VERSION);
let types = horizon_client::mobs::MobTypes::load(&root).ok()?;
let t = std::sync::Arc::new(types.types.get(kind)?.clone());
Some(Mob::new(
1,
t,
horizon_core::geometry::Vec3::new(0.0, 64.0, 0.0),
0.0,
))
}
fn freeze_meta(m: &Mob) -> (Vec<(u8, i32, Value)>, Vec<(u8, i32, Value)>) {
let (mut meta, mut defaults) = (Vec::new(), Vec::new());
mob_freeze_meta(m, &mut meta, &mut defaults);
(meta, defaults)
}
/// Entity.setTicksFrozen can go negative; index 7 must carry it. Index 1
/// (air supply) goes out for an axolotl only, against its 6000 default.
#[test]
fn negative_frozen_ticks_and_axolotl_air_are_synced() {
let Some(mut cow) = mob_of("minecraft:cow") else {
return;
};
cow.ticks_frozen = -3;
let (meta, _) = freeze_meta(&cow);
assert!(meta.contains(&(7, serializer::INT, Value::Int(-3))));
cow.air = 100;
assert!(freeze_meta(&cow).0.iter().all(|e| e.0 != 1));
let Some(mut axolotl) = mob_of("minecraft:axolotl") else {
return;
};
axolotl.air = 5000;
let (meta, defaults) = freeze_meta(&axolotl);
assert!(meta.contains(&(1, serializer::INT, Value::Int(5000))));
assert!(defaults.contains(&(1, serializer::INT, Value::Int(6000))));
axolotl.air = 6000;
assert!(freeze_meta(&axolotl).0.iter().all(|e| e.0 != 1));
}
/// `LivingEntity.startUsingItem` sets flag 1 for the use and flag 2 for
/// the off hand, so an off-hand use is 3, not 2. A reader takes bit 0 as
+86 -1
View File
@@ -1364,7 +1364,11 @@ impl Game<'_> {
// around, the opener included (`playSound(null, …)`, which the capture
// relay sends on to the guests). Without it the host's copy never
// learned of the open, so a guest's box opened silently.
if counts_openers && self.container_openers_changed(pos, true) {
// A spectator never joins the openers (`startOpen` returns on
// `player.isSpectator()`): its menu opens but the lid stays shut, no
// sound plays, and `stopOpen` has nothing to decrement, which is why
// the count must not be raised here either (#8517).
if counts_openers && !spectator && self.container_openers_changed(pos, true) {
self.container_edge_sound(pos, true);
}
true
@@ -4252,6 +4256,36 @@ impl Game<'_> {
}
}
/// `LivingEntity.checkAutoSpinAttack` for a server's copy of a Riptide
/// spinner (it runs before `aiStep`'s countdown clears the damage): the
/// first mob touching the player's box takes `Player.attack` with the
/// spin's damage and the spin ends. A `ServerPlayer` is client
/// authoritative, so its `aiStep` does not travel and both boxes vanilla
/// passes are the current one: no sweep over the tick's moves.
pub(super) fn server_spin_attack(&mut self) {
let Some(p) = self.player.as_ref() else {
return;
};
if p.auto_spin_attack_ticks <= 0 {
return;
}
let swept = p.bounds();
let riding = self.riding;
let Some(index) = first_spin_target(
swept,
riding,
self.mobs.iter().map(|m| (m.id, m.removed, m.bounds())),
) else {
return;
};
self.attack_mob(index);
if let Some(p) = self.player.as_mut() {
p.auto_spin_attack_ticks = 0;
p.auto_spin_attack_dmg = 0.0;
p.velocity = p.velocity.scale(-0.2);
}
}
/// The guest's body on the server each tick: ServerPlayer.tick's damage
/// clock and Entity.baseTick's fluid phase (burning), then for each move
/// the guest made ServerGamePacketListenerImpl.handleMovePlayer's jump
@@ -4294,6 +4328,12 @@ impl Game<'_> {
let at = g.position;
let (sneaking, sleeping) = (g.sneaking, g.sleeping);
let riding = g.vehicle.is_some();
if g.motion
.as_ref()
.is_some_and(|m| m.auto_spin_attack_ticks > 0)
{
self.as_guest(host, conn, |game| game.server_spin_attack());
}
let mut soul = None;
let mut jumps = 0;
let events = self.as_guest(host, conn, |game| {
@@ -5578,3 +5618,48 @@ mod aim_point_tests {
);
}
}
/// The first target `(id, removed, bounds)` whose box meets the swept box,
/// skipping removed ones and the vehicle the player rides.
fn first_spin_target(
swept: Aabb,
riding: Option<u32>,
mut targets: impl Iterator<Item = (u32, bool, Aabb)>,
) -> Option<usize> {
targets.position(|(id, removed, b)| !removed && Some(id) != riding && b.intersects(swept))
}
#[cfg(test)]
mod spin_target_tests {
use super::first_spin_target;
use horizon_core::geometry::{Aabb, Vec3};
fn cube(x: f64) -> Aabb {
Aabb::new(Vec3::new(x, 0.0, 0.0), Vec3::new(x + 1.0, 1.0, 1.0))
}
/// The spin hits the first mob in the swept box, not a removed one, the
/// vehicle, or one out of reach.
#[test]
fn the_spin_picks_the_first_live_mob_in_the_sweep() {
let swept = Aabb::new(Vec3::new(0.0, 0.0, 0.0), Vec3::new(3.0, 1.0, 1.0));
let targets = [
(1, false, cube(10.0)),
(2, true, cube(1.0)),
(3, false, cube(1.5)),
(4, false, cube(2.0)),
];
assert_eq!(
first_spin_target(swept, None, targets.iter().copied()),
Some(2)
);
assert_eq!(
first_spin_target(swept, Some(3), targets.iter().copied()),
Some(3)
);
assert_eq!(
first_spin_target(swept, None, targets[..2].iter().copied()),
None
);
}
}
Loaded 100 of 297 files, more files were not shown because too many files have changed in this diff. Show more