Repository navigation
fix: point the Smart Cull button at the real renderer option #598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sandexzx
wants to merge
2
commits into
next
Choose a base branch
from
fix/smart-cull-surface-89
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+23
−6
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: zardoy/minecraft-web-client
Length of output: 18532
🏁 Script executed:
Repository: zardoy/minecraft-web-client
Length of output: 15877
🏁 Script executed:
Repository: zardoy/minecraft-web-client
Length of output: 6459
🏁 Script executed:
Repository: zardoy/minecraft-web-client
Length of output: 6259
🌐 Web query:
minecraft-renderer smartCull reactiveDebugParams inWorldRenderingConfig documentation💡 Result:
The terms you are inquiring about appear in two distinct contexts: the official Minecraft Java Edition engine and the third-party JavaScript library 'minecraft-renderer'. In the official Minecraft Java Edition, 'smartCull' refers to a rendering optimization feature (often identified as chunk culling) that can be toggled via debug hotkeys, such as F3 + L [1][2]. It is exposed in the game's client-side code as a boolean property, 'smartCull', within the Minecraft class [3][4]. In the context of the 'minecraft-renderer' library (a JavaScript/TypeScript renderer for Minecraft data), 'inWorldRenderingConfig' is a configuration object used to manage rendering settings [5][6]. Based on the library's official documentation, the 'WorldRendererConfig' interface includes settings for performance (e.g., 'mesherWorkers'), rendering (e.g., 'enableLighting', 'fov'), and debugging (e.g., 'showChunkBorders', 'enableDebugOverlay') [5][7]. There is no standard or widely documented single configuration string or object combining 'smartCull', 'reactiveDebugParams', and 'inWorldRenderingConfig'. It is highly likely that 'reactiveDebugParams' is either a custom implementation specific to a particular project's codebase, a typo, or a misidentification of a reactive state management pattern (such as 'valtio', which the 'minecraft-renderer' library explicitly uses to synchronize 'inWorldRenderingConfig' [5][8]). If you are working with a specific codebase, you should search for 'reactiveDebugParams' directly within your project's files, as it is not part of the standard Minecraft API or the public 'minecraft-renderer' documentation.
Citations:
🌐 Web query:
site:github.com/zardoy/minecraft-renderer smartCull reactiveDebugParams inWorldRenderingConfig💡 Result:
The terms smartCull, reactiveDebugParams, and inWorldRenderingConfig are associated with the zardoy/minecraft-renderer project, which is a library for rendering Minecraft-style worlds in the browser [1][2]. inWorldRenderingConfig This is a configuration object used within the renderer to control various aspects of world rendering, performance, and debugging [1]. It is part of the system managed by the library's main thread and is synchronized with off-thread backends (such as mesher workers) using valtio's syncToWorker functionality [1]. Its schema includes: - Performance settings (e.g., mesherWorkers, addChunksBatchWaitTime) [1]. - Rendering options (e.g., enableLighting, smoothLighting, fov) [1]. - Debug options (e.g., showChunkBorders, enableDebugOverlay) [1]. smartCull and reactiveDebugParams While inWorldRenderingConfig is a documented interface in the project, smartCull and reactiveDebugParams appear to be specific internal implementation details, parameters, or debug/performance flags likely found within the source code or related feature branches of this repository [3][4][5]. In the context of this renderer: - smartCull likely refers to the project's frustum and section occlusion culling systems (e.g., the section occlusion culling feature) which optimize rendering by excluding hidden or off-screen sections [3][4][5]. - reactiveDebugParams likely refers to reactive configuration parameters used to toggle debug overlays, chunk borders, or other instrumentation dynamically during runtime, often utilizing the same reactive state management (valtio) as inWorldRenderingConfig [1][6]. For authoritative details, these identifiers are best investigated directly within the source files of the zardoy/minecraft-renderer repository, specifically under src/three/ or src/graphicsBackend/ [7][3][4].
Citations:
🌐 Web query:
github zardoy minecraft-renderer smartCull reactiveDebugParams assignment💡 Result:
I couldn’t find any occurrences (in the sources surfaced by this search) of the exact identifiers “smartCull” or “reactiveDebugParams” in the zardoy/minecraft-renderer GitHub code/PRs/commits that were returned. What I did find (relevant adjacent behavior) 1) Frustum culling + “draw spans” - The project has a pass that frustum-culls sections and builds visible “(start,count) draw spans” for rendering (PR “feat: frustum-culled draw spans + sorted global transparent buffer”). It also excludes sections with visible=false from the span builder. [1] - There’s also a related PR focused on legacy draw spans and cap/merge behavior. [2] 2) “Cull registry” + avoiding redundant work - Another PR explicitly mentions a “cull registry” and that it now tracks only sections with legacy geometry; plus it computes a fingerprint of the visible set to skip redundant span rebuilds. [3] 3) Debug overlay option surface (not the identifiers you asked about) - The README documents general debug/perf options such as enableDebugOverlay and showChunkBorders (but not “reactiveDebugParams”). [4] Interpretation relative to your query - It’s likely that “smartCull” and “reactiveDebugParams” either (a) exist in files not returned by this search result set, (b) were renamed, (c) live on a different branch/repo/tag, or (d) are referenced by generated/compiled artifacts not indexed by the search results we pulled. If you want, paste the exact file path(s) or commit hash(es) where you saw “smartCull” / “reactiveDebugParams” (even a screenshot/snippet). With that, I can do a targeted follow-up search to locate the assignment(s) and explain what they do. Top evidence from the current search set - Frustum-culling into draw spans and excluding visible=false sections: [1] - Culling only legacy sections + skipping redundant span rebuilds via a visible-set fingerprint: [3] - General debug options in README (no “reactiveDebugParams” here): [4]
Citations:
🏁 Script executed:
Repository: zardoy/minecraft-web-client
Length of output: 8098
🌐 Web query:
github zardoy minecraft-renderer src/graphicsBackend/rendererOptionsSync inWorldRenderingConfig💡 Result:
In the zardoy/minecraft-renderer project, inWorldRenderingConfig is an internal state object updated during runtime synchronization of renderer options [1][2]. It is managed via the subscribeRendererOptions function located within src/graphicsBackend/rendererOptionsSync.ts (or related modules in the graphicsBackend directory) [3][4][5]. When this function is called after the initialization of the AppViewer and backend, it synchronizes renderer settings from the application's options store to the renderer's internal configuration [1][5]. Key details regarding inWorldRenderingConfig include: - Function: It acts as the configuration source for in-world rendering behavior, updating dynamically based on changes to application settings [1][5]. - Implementation: Sync operations must be performed on the main thread only [1][2]. - Worker Compatibility: For off-thread backends, it utilizes an existing Valtio syncToWorker mechanism to propagate changes to workers; developers are explicitly instructed not to call subscribeRendererOptions directly from mesher workers [1][5]. - Context: It is part of a broader system where renderer-owned options are defined in RENDERER_DEFAULT_OPTIONS and RENDERER_OPTIONS_META in src/graphicsBackend/rendererDefaultOptions.ts [1][5].
Citations:
Reapply Smart Cull when the world renderer is created.
src/watchOptions.ts:49-55appliesrendererSmartCullduringappViewerinitialization, butwindow.worldis bound later insrc/index.ts.watchValueonly re-runs whenoptions.rendererSmartCullchanges, so an already-disabled option leaves the world renderer without applying Smart Cull. Move the world-renderer reapplication to the renderer creation path, or add a separate creation-time trigger for the current option value.🤖 Prompt for AI Agents