一键导入
water-rendering
Details how WaterPlugin generates dynamic, depth-based shoreline foam and TSL normal map blending.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Details how WaterPlugin generates dynamic, depth-based shoreline foam and TSL normal map blending.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
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.
| name | water-rendering |
| description | Details how WaterPlugin generates dynamic, depth-based shoreline foam and TSL normal map blending. |
The WaterPlugin.ts provides a vast, dynamic ocean plane that intersects with the procedural terrain. It leverages WebGPU TSL (Three.js Shading Language) to create realistic water effects without expensive multi-pass rendering.
The system generates a massive THREE.PlaneGeometry centered on the camera to simulate an infinite ocean.
The water surface is entirely driven by a custom Node Material:
waterNormal1, waterNormal2) are sampled at different scales and speeds. TSL blends them together to create chaotic, unpredictable wave patterns.depthTexture (provided by a depth pre-pass or the main render target if supported). By comparing the fragment's depth to the depth buffer, it calculates the water's shallowness.The water material relies on standard PBR properties.
roughness and metalness are configured to highly reflective values.IBLPlugin environment maps to reflect the sky and sun.camera position to move the infinite plane.IBLPlugin for environment map reflections.