[PR #7391] [MERGED] Cache particle light lookups per block #7571

Closed
opened 2026-11-03 07:20:00 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7391
Author: @elythepreciouscat
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: perf/particle-light-cache


📝 Commits (2)

  • 79adacb Cache particle light lookups per block
  • af73537 Merge remote-tracking branch 'origin/main' into perf/particle-light-cache-main

📊 Changes

1 file changed (+58 additions, -1 deletions)

View changed files

📝 crates/horizon-client-render/src/particles.rs (+58 -1)

📄 Description

🤖 Opened by elythepreciouscat's AI agent (OpenAI Codex, GPT-6), not by elythepreciouscat personally.

What and why

Caches packed block-light lookups for particles that share a block during a render pass. The fixed-size direct-mapped cache verifies the full block coordinate and recomputes on collisions, so it cannot return light from a different block. The cache is local to one render call and has no stale-light state.

This is split from Particle Culling in #7054. It changes only particle light lookup reuse and does not add a setting or visibility behavior.

Measurement

Two opposite-order passes on the ordinary scene with 24 mobs, about 9,400–10,100 rain particles and 50–109 campfire smoke particles; Intel Core i7-3770S, Intel HD Graphics 4000, Vulkan/Mesa, 675×727, render distance 4, VSync off, 260 FPS cap. Reported values are the mean of both 8-second samples:

Build FPS CPU ms/frame Frame p99 ms
Main, culling Off 88.59 1.829 24.51
Particle light cache, culling Off 88.88 1.828 24.51

The ordinary-scene difference is within measurement noise. It shows no measurable default-path regression; it does not establish a broad FPS gain. The cache collision/reuse behavior has a focused unit test; checks were not rerun for this split.

Kind

  • parity
  • bug
  • perf
  • feature
  • extra
  • tooling
  • docs

🤖 Generated with OpenAI Codex


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/7391 **Author:** [@elythepreciouscat](https://github.com/elythepreciouscat) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/particle-light-cache` --- ### 📝 Commits (2) - [`79adacb`](https://github.com/horizon-rust/horizon/commit/79adacb982f4ac3aa7a5c4bccf1704c30bb0a1e3) Cache particle light lookups per block - [`af73537`](https://github.com/horizon-rust/horizon/commit/af735379584ac3d64f6b5fd158c7a59399e2778e) Merge remote-tracking branch 'origin/main' into perf/particle-light-cache-main ### 📊 Changes **1 file changed** (+58 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/particles.rs` (+58 -1) </details> ### 📄 Description > 🤖 Opened by elythepreciouscat's AI agent (OpenAI Codex, GPT-6), not by elythepreciouscat personally. ## What and why Caches packed block-light lookups for particles that share a block during a render pass. The fixed-size direct-mapped cache verifies the full block coordinate and recomputes on collisions, so it cannot return light from a different block. The cache is local to one render call and has no stale-light state. This is split from Particle Culling in #7054. It changes only particle light lookup reuse and does not add a setting or visibility behavior. ## Measurement Two opposite-order passes on the ordinary scene with 24 mobs, about 9,400–10,100 rain particles and 50–109 campfire smoke particles; Intel Core i7-3770S, Intel HD Graphics 4000, Vulkan/Mesa, 675×727, render distance 4, VSync off, 260 FPS cap. Reported values are the mean of both 8-second samples: | Build | FPS | CPU ms/frame | Frame p99 ms | | --- | ---: | ---: | ---: | | Main, culling Off | 88.59 | 1.829 | 24.51 | | Particle light cache, culling Off | 88.88 | 1.828 | 24.51 | The ordinary-scene difference is within measurement noise. It shows no measurable default-path regression; it does not establish a broad FPS gain. The cache collision/reuse behavior has a focused unit test; checks were not rerun for this split. ## Kind - [ ] parity - [ ] bug - [x] perf - [ ] feature - [ ] extra - [ ] tooling - [ ] docs 🤖 Generated with [OpenAI Codex](https://openai.com/codex) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 07:20:00 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#7571
No description provided.