Skip to content
Merged
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
28 changes: 6 additions & 22 deletions chunky/src/java/se/llbit/chunky/renderer/scene/Scene.java
Original file line number Diff line number Diff line change
Expand Up @@ -1353,14 +1353,6 @@ public synchronized void loadChunks(TaskTracker taskTracker, World world, Map<Re
dryFoliageTexture,
waterTexture);
}

// TODO we could skip blending the grass, foliage and dry foliage textures in this case
if (!biomeUsed) {
grassTexture = biomeStructureFactory.create();
foliageTexture = biomeStructureFactory.create();
dryFoliageTexture = biomeStructureFactory.create();
// the water texture is still used to check for loaded chunks and tint the water plane
}
} else {
BiomeBlendingUtility.chunk2DBlur(
cp,
Expand All @@ -1374,14 +1366,6 @@ public synchronized void loadChunks(TaskTracker taskTracker, World world, Map<Re
foliageTexture,
dryFoliageTexture,
waterTexture);

// TODO we could skip blending the grass, foliage and dry foliage textures in this case
if (!biomeUsed) {
grassTexture = biomeStructureFactory.create();
foliageTexture = biomeStructureFactory.create();
dryFoliageTexture = biomeStructureFactory.create();
// the water texture is still used to check for loaded chunks and tint the water plane
}
}
} else {
if(use3dBiomes) {
Expand All @@ -1396,12 +1380,12 @@ public synchronized void loadChunks(TaskTracker taskTracker, World world, Map<Re
int id = biomePaletteIdxStructure.get(wx, wy, wz);

Biome biome = biomePalette.get(id);
if (biomeUsed) {
grassTexture.set(cp.x * 16 + x - origin.x, sectionY * 16 + y - origin.y, cp.z * 16 + z - origin.z, biome.grassColorLinear);
foliageTexture.set(cp.x * 16 + x - origin.x, sectionY * 16 + y - origin.y, cp.z * 16 + z - origin.z, biome.foliageColorLinear);
dryFoliageTexture.set(cp.x * 16 + x - origin.x, sectionY * 16 + y - origin.y, cp.z * 16 + z - origin.z, biome.dryFoliageColorLinear);
}
// the water texture is used to check for loaded chunks and tint the water plane, so we always need that one
if (biomeUsed) {
grassTexture.set(cp.x * 16 + x - origin.x, sectionY * 16 + y - origin.y, cp.z * 16 + z - origin.z, biome.grassColorLinear);
foliageTexture.set(cp.x * 16 + x - origin.x, sectionY * 16 + y - origin.y, cp.z * 16 + z - origin.z, biome.foliageColorLinear);
dryFoliageTexture.set(cp.x * 16 + x - origin.x, sectionY * 16 + y - origin.y, cp.z * 16 + z - origin.z, biome.dryFoliageColorLinear);
}
// the water texture is used to check for loaded chunks and tint the water plane, so we always need that one
waterTexture.set(cp.x * 16 + x - origin.x, sectionY * 16 + y - origin.y, cp.z * 16 + z - origin.z, biome.waterColorLinear);
}
}
Expand Down
Loading