Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/rendering/Biomes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ export const BIOMES: Record<BiomeType, BiomeConfig> = {
treeDensity: 0.15, // Sparse dead trees
rockDensity: 0.2,
crystalDensity: 0.3, // Ice crystals
hasWater: false, // Disabled - water plane at 0.2 was visible over low-elevation terrain causing animated diagonal stripe artifacts
waterLevel: -1,
hasWater: true, // Re-enabled - depth sorting fix resolves previous artifacts
waterLevel: 5, // Frozen lakes at low elevation (elevation units, not world height)
particleType: 'snow', // Gentle snowfall
groundRoughness: 0.3, // Icy smooth
groundMetalness: 0.1,
Expand Down Expand Up @@ -232,9 +232,9 @@ export const BIOMES: Record<BiomeType, BiomeConfig> = {
treeDensity: 0,
rockDensity: 0.3,
crystalDensity: 0.6, // Many crystals
hasWater: false, // Disabled - water plane at 0 was visible over elevation 0 terrain causing animated diagonal stripe artifacts
waterLevel: -1,
particleType: 'none', // Disabled - was 'spores'
hasWater: true, // Re-enabled - depth sorting fix resolves previous artifacts
waterLevel: 0, // Void energy pools at lowest elevation
particleType: 'spores', // Re-enabled floating spores
groundRoughness: 0.6,
groundMetalness: 0.3,
},
Expand Down Expand Up @@ -274,8 +274,8 @@ export const BIOMES: Record<BiomeType, BiomeConfig> = {
treeDensity: 0.7,
rockDensity: 0.2,
crystalDensity: 0.05,
hasWater: false, // Disabled - water plane at 0.1 was visible over low-elevation terrain causing animated diagonal stripe artifacts
waterLevel: -1,
hasWater: true, // Re-enabled - depth sorting fix resolves previous artifacts
waterLevel: 3, // Swamps and rivers at low elevation
particleType: 'spores', // Floating spores and pollen
groundRoughness: 0.8,
groundMetalness: 0.0,
Expand Down
6 changes: 5 additions & 1 deletion src/rendering/EnvironmentManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,14 @@ export class EnvironmentManager {
envMap: this.envMap,
});

// Create unified water mesh
// Create unified water mesh with biome water level for proper depth sorting
// Ocean biome uses global sea level, other biomes use per-region minimum elevation
const isOceanBiome = this.biome.name === 'Ocean';
this.unifiedWaterMesh = new UnifiedWaterMesh({
quality: optimalQuality,
material: this.waterMaterial.getMaterial(),
globalWaterLevel: this.biome.waterLevel ?? 0,
useGlobalSeaLevel: isOceanBiome,
});

// Build water from terrain data
Expand Down
Loading
Loading