Class: ChunkRenderer
The world's chunk materials, keyed by bucket (makeChunkMaterialKey),
and the shading inputs they read: uniforms (fog, sky, wind, water,
clock, the far seam) and shaderLightingUniforms (the sun, its cascades,
the water's look). Both are TSL nodes; hosts write node.value.
Constructors
constructor
• new ChunkRenderer(): ChunkRenderer
Returns
Properties
materials
• materials: Map<string, ChunkMaterial>
shaderLightingUniforms
• shaderLightingUniforms: Object
Type declaration
| Name | Type | Description |
|---|---|---|
ambientColor | ValueUniform<Color> | - |
bedCausticScale | ValueUniform<1> | 0..1 scale on the caustic net seen on submerged faces from below. |
cascadeSplit0 | ValueUniform<16> | - |
cascadeSplit1 | ValueUniform<48> | - |
cascadeSplit2 | ValueUniform<128> | - |
celestialDirection | ValueUniform<Vector3> | The celestial disc above the horizon as the sky box actually draws it (getVisibleDiscDirection): the sun by day, the moon by night, never clamped or tilted. Specular reflections read this, so the sun on the water sits under the sun in the sky. |
directSunlight | ValueUniform<1> | The share of the sun (the moon by night) that reaches the world as a direct beam, 0..1: 1 under a clear sky, falling as cloud veils the disc. What only a beam draws (glints on water, caustics, the disc seen through the surface from below) scales by it; diffuse daylight (sunlightIntensity) does not. A host with weather lowers it. |
shadowBias | ValueUniform<0.00018> | - |
shadowDebugMode | ValueUniform<0> | - |
shadowDepthPerBlock | ValueUniform<0> | How much shadow-map depth one block toward the sun spans (cascade 0), for an entity measuring its own body in the map. |
shadowMap0 | TextureNode<"vec4"> | - |
shadowMap1 | TextureNode<"vec4"> | - |
shadowMap2 | TextureNode<"vec4"> | - |
shadowMatrix0 | ValueUniform<Matrix4> | - |
shadowMatrix1 | ValueUniform<Matrix4> | - |
shadowMatrix2 | ValueUniform<Matrix4> | - |
shadowNormalBias | ValueUniform<0.0015> | - |
shadowSideFaceBiasScale | ValueUniform<1> | - |
shadowSlopeBiasMin | ValueUniform<0.00012> | - |
shadowSlopeBiasScale | ValueUniform<0.0012> | - |
shadowStrength | ValueUniform<1> | - |
shadowTopFaceBiasScale | ValueUniform<1> | - |
skyMiddleColor | ValueUniform<Color> | - |
skyTopColor | ValueUniform<Color> | - |
sunColor | ValueUniform<Color> | - |
sunDirection | ValueUniform<Vector3> | The shading light: held above a minimum elevation, tilted off the sun's plane, and blended toward the moon through twilight, so terrain shading and shadows stay readable at every hour. Not where the sun is drawn. |
sunlightIntensity | ValueUniform<1> | The sun's intensity as the sky gives it (the chunk set's own copy keeps a floor of 0.05): what entity shadows fade with at night. |
waterAbsorption | ValueUniform<1> | - |
waterFresnelStrength | ValueUniform<0.5> | - |
waterLevel | ValueUniform<86> | - |
waterStreakStrength | ValueUniform<0.1> | - |
waterTint | ValueUniform<Color> | - |
uniforms
• uniforms: ChunkUniforms