formatting changes in voxel generation shader
This commit is contained in:
parent
0074bf1d1f
commit
95a27cfd50
2 changed files with 40 additions and 26 deletions
|
|
@ -681,11 +681,11 @@ public class GameCore implements GameLogic {
|
|||
Vector3f CamRot = cam.GetRotation();
|
||||
Vector3i ChunkPos = new Vector3i((int)Math.floor(CamPos.x/ (float) VoxelChunkGenerator.CHUNK_SIZE),(int)Math.floor(CamPos.y/ (float)VoxelChunkGenerator.CHUNK_SIZE),(int)Math.floor(CamPos.z/ (float)VoxelChunkGenerator.CHUNK_SIZE));
|
||||
if(ChunkPos.x != VoxelWorldManager.LastPosition.x || ChunkPos.y != VoxelWorldManager.LastPosition.y || ChunkPos.z != VoxelWorldManager.LastPosition.z || CamRot.x != LastCamRotation.x || CamRot.y != LastCamRotation.y || CamRot.z != LastCamRotation.z) {
|
||||
VoxelWorldManager.UnloadFarChunks(ChunkPos, 20,cam.GetViewMatrix(),projection.GetProjectionMatrix());
|
||||
VoxelWorldManager.GenerateChunks(ChunkPos, new Vector3i(20,8,20),cam.GetViewMatrix(),projection.GetProjectionMatrix());
|
||||
VoxelWorldManager.UnloadFarChunks(ChunkPos, 12,cam.GetViewMatrix(),projection.GetProjectionMatrix());
|
||||
VoxelWorldManager.GenerateChunks(ChunkPos, new Vector3i(12,8,12),cam.GetViewMatrix(),projection.GetProjectionMatrix());
|
||||
} else {
|
||||
VoxelWorldManager.UnloadFarChunks(ChunkPos, 64,cam.GetViewMatrix(),projection.GetProjectionMatrix());
|
||||
VoxelWorldManager.GenerateChunks(ChunkPos, new Vector3i(32,12,32),cam.GetViewMatrix(),projection.GetProjectionMatrix());
|
||||
VoxelWorldManager.UnloadFarChunks(ChunkPos, 24,cam.GetViewMatrix(),projection.GetProjectionMatrix());
|
||||
VoxelWorldManager.GenerateChunks(ChunkPos, new Vector3i(24,12,24),cam.GetViewMatrix(),projection.GetProjectionMatrix());
|
||||
}
|
||||
LastCamRotation.set(CamRot);
|
||||
if(PrimaryRuntime.IsServer){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue