一键导入
quadlod-terrain
Architectural instructions for the standalone QuadLOD Terrain Plugin. Explains how the GPU Compute pipeline connects to the QuadTree mesh generator.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Architectural instructions for the standalone QuadLOD Terrain Plugin. Explains how the GPU Compute pipeline connects to the QuadTree mesh generator.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Architectural instructions for the standalone Cascaded Shadow Maps (CSM) Plugin. Explains how CSMShadowNode integrates with the lighting system and WebGPU nodes.
Outlines the DebugUIPlugin architecture and its schema-driven design for safe settings injection.
Explains how GrassPlugin maps InstancedMesh pools to QuadTreeLOD chunks, including TSL wind animations and exclusion maps.
Documents PlayerControllerPlugin and InputPlugin, detailing how movement interacts with the procedural terrain.
Explains how PostProcessPlugin intercepts the Three.js pipeline for WebGPU-compatible Bloom and Color Grading.
Covers SkyPlugin and IBLPlugin, explaining procedural sun cycles and dynamic environment map baking.
基于 SOC 职业分类
| name | quadlod-terrain |
| description | Architectural instructions for the standalone QuadLOD Terrain Plugin. Explains how the GPU Compute pipeline connects to the QuadTree mesh generator. |
The QuadLOD Terrain is a standalone, purely GPU-driven procedural landscape generator. It is completely agnostic of game logic (no SpacetimeDB or Entity logic).
The system is composed of the following isolated modules:
TerrainPlugin.ts: The high-level orchestrator. It acts as the bridge between the core generic PluginManager and the inner terrain engine.TerrainSystem.js: The primary API. It boots the compute shaders, compiles the raw TSL (Three Shading Language) materials, and maintains the QuadTreeLOD instance. It holds the onTerrainUpdated(heightData, size, scale) callback which external game logic can listen to.QuadTreeLOD.js: The spatial manager. It dynamically splits a flat plane into a dense grid of microscopic chunks near the camera, while leaving distant chunks massive. The vertex displacement is entirely handled by the TerrainSystem's TSL material.GPUCompute.js: Dispatches the .wgsl shaders sequentially. height -> biome -> spawn.GraphGenerator.js: Runs purely on the CPU to pre-calculate rivers using a directed node graph before feeding it to the GPU.TerrainDebugUI.js: A decoupled DOM interface for live-tuning WebGPU uniforms and triggering the regenerate callback.-400. Normalizing the heightmap (0.0 - 1.0), sea level is exactly at Y 0.terrainSystem.sampleHeightWorld(x, z). The mesh is visually displaced on the GPU only.QuadTreeLOD.js via the positionNode.If you are adding new biomes or height layers:
src/gpu/biome.compute.wgsl to paint the new channel weights._buildTSLMaterial() TSL logic within TerrainSystem.js.DEFAULT_TERRAIN_PARAMS in TerrainDebugUI.js to expose the tunable constraints.