lod cache stratification working
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
bf292f29c6
commit
6b2f323fdf
@ -6,7 +6,6 @@ import java.util.List;
|
||||
import org.joml.Vector3d;
|
||||
import org.joml.Vector3i;
|
||||
|
||||
import electrosphere.client.terrain.cache.ChunkData;
|
||||
import electrosphere.client.terrain.cells.DrawCell.DrawCellFace;
|
||||
import electrosphere.engine.Globals;
|
||||
import electrosphere.entity.EntityUtils;
|
||||
@ -510,11 +509,11 @@ public class ClientDrawCellManager {
|
||||
posToCheck.y < Globals.clientWorldData.getWorldDiscreteSize() &&
|
||||
posToCheck.z >= 0 &&
|
||||
posToCheck.z < Globals.clientWorldData.getWorldDiscreteSize() &&
|
||||
!Globals.clientTerrainManager.containsChunkDataAtWorldPoint(posToCheck.x, posToCheck.y, posToCheck.z, ChunkData.NO_STRIDE)
|
||||
!Globals.clientTerrainManager.containsChunkDataAtWorldPoint(posToCheck.x, posToCheck.y, posToCheck.z, lod)
|
||||
){
|
||||
//client should request chunk data from server for each chunk necessary to create the model
|
||||
LoggerInterface.loggerNetworking.DEBUG("(Client) Send Request for terrain at " + posToCheck);
|
||||
Globals.clientTerrainManager.requestChunk(posToCheck.x, posToCheck.y, posToCheck.z, ChunkData.NO_STRIDE);
|
||||
Globals.clientTerrainManager.requestChunk(posToCheck.x, posToCheck.y, posToCheck.z, lod);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -542,7 +541,7 @@ public class ClientDrawCellManager {
|
||||
posToCheck.y < Globals.clientWorldData.getWorldDiscreteSize() &&
|
||||
posToCheck.z >= 0 &&
|
||||
posToCheck.z < Globals.clientWorldData.getWorldDiscreteSize() &&
|
||||
!Globals.clientTerrainManager.containsChunkDataAtWorldPoint(posToCheck.x, posToCheck.y, posToCheck.z, ChunkData.NO_STRIDE)
|
||||
!Globals.clientTerrainManager.containsChunkDataAtWorldPoint(posToCheck.x, posToCheck.y, posToCheck.z, lod)
|
||||
){
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -12,7 +12,6 @@ import electrosphere.engine.Globals;
|
||||
import electrosphere.entity.ClientEntityUtils;
|
||||
import electrosphere.entity.Entity;
|
||||
import electrosphere.entity.types.terrain.TerrainChunk;
|
||||
import electrosphere.renderer.meshgen.TransvoxelModelGeneration;
|
||||
import electrosphere.renderer.meshgen.TransvoxelModelGeneration.TransvoxelChunkData;
|
||||
|
||||
/**
|
||||
@ -195,7 +194,7 @@ public class DrawCell {
|
||||
worldPos.x + x / ChunkData.CHUNK_SIZE * spacingFactor,
|
||||
worldPos.y + y / ChunkData.CHUNK_SIZE * spacingFactor,
|
||||
worldPos.z + z / ChunkData.CHUNK_SIZE * spacingFactor,
|
||||
ChunkData.NO_STRIDE
|
||||
lod
|
||||
);
|
||||
if(currentChunk == null){
|
||||
return false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user